pgp-rb 0.1.0-x86_64-linux → 0.1.2-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pgp-rb/3.1/pgp_rb.so +0 -0
- data/lib/pgp-rb/3.2/pgp_rb.so +0 -0
- data/lib/pgp-rb/3.3/pgp_rb.so +0 -0
- data/lib/pgp-rb/version.rb +1 -1
- data/lib/pgp.rb +18 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98d9a9c246591e26b6d27361e368f2fc8e812b72eee58a136ac95d6045dfba2f
|
4
|
+
data.tar.gz: 959dfbc686de9ebf0d3064d4ed3233fb3d664aa9f16b22151060c70631ed8dba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada006cd7e826e57cc8f2fa4740cabb35ec57a46df55f59c4075bc32673884f2493c53010cccc13bb86fbefd03c24359e834520e7047e54330422058135d436d
|
7
|
+
data.tar.gz: 0ee004a18db1ccc6bef9159ce46715f28525eaddd3eb61b5b7f615eb77fe66c8c25d7d340aa28260adb0a47c49119332b01ae4bd1e372364baf6dc29f52070e5
|
data/lib/pgp-rb/3.1/pgp_rb.so
CHANGED
Binary file
|
data/lib/pgp-rb/3.2/pgp_rb.so
CHANGED
Binary file
|
data/lib/pgp-rb/3.3/pgp_rb.so
CHANGED
Binary file
|
data/lib/pgp-rb/version.rb
CHANGED
data/lib/pgp.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
begin
|
4
|
+
/(?<ruby_version>\d+\.\d+)/ =~ RUBY_VERSION
|
5
|
+
require_relative "pgp-rb/#{ruby_version}/pgp_rb"
|
6
|
+
rescue LoadError
|
7
|
+
require_relative 'pgp-rb/pgp_rb'
|
8
|
+
end
|
4
9
|
|
5
10
|
module PGP
|
6
11
|
KEY_ALGORITHM_RSA = 1
|
@@ -27,17 +32,17 @@ module PGP
|
|
27
32
|
KEY_ALGORITHM_EDDSA => 'EdDSA'
|
28
33
|
}.freeze
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
35
|
+
ENCRYPTION_ALGORITHM_IDEA = 1
|
36
|
+
ENCRYPTION_ALGORITHM_TRIPLE_DES = 2
|
37
|
+
ENCRYPTION_ALGORITHM_CAST5 = 3
|
38
|
+
ENCRYPTION_ALGORITHM_BLOWFISH = 4
|
39
|
+
ENCRYPTION_ALGORITHM_AES_128 = 7
|
40
|
+
ENCRYPTION_ALGORITHM_AES_192 = 8
|
41
|
+
ENCRYPTION_ALGORITHM_AES_256 = 9
|
42
|
+
ENCRYPTION_ALGORITHM_TWOFISH = 10
|
43
|
+
ENCRYPTION_ALGORITHM_CAMELLIA_128 = 11
|
44
|
+
ENCRYPTION_ALGORITHM_CAMELLIA_192 = 12
|
45
|
+
ENCRYPTION_ALGORITHM_CAMELLIA_256 = 13
|
41
46
|
|
42
47
|
# Public Key class provides an native extension representation for working with PGP public keys.
|
43
48
|
class PublicKey
|
@@ -106,7 +111,7 @@ module PGP
|
|
106
111
|
# @param data [String] the data to be encrypted.
|
107
112
|
# @param algorithm [Integer] the encryption algorithm to use, defaults to AES-128.
|
108
113
|
# @return [String] the encrypted data encoded by base64.
|
109
|
-
def encrypt(data, algorithm =
|
114
|
+
def encrypt(data, algorithm = ENCRYPTION_ALGORITHM_AES_128)
|
110
115
|
encrypt_with_algorithm(data, algorithm)
|
111
116
|
end
|
112
117
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgp-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- Kirill Zaitsev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|