pgp-rb 0.1.3-x86_64-linux → 0.2.0-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pgp-rb/3.2/pgp_rb.so +0 -0
- data/lib/pgp-rb/3.4/pgp_rb.so +0 -0
- data/lib/pgp-rb/version.rb +1 -1
- data/lib/pgp.rb +28 -20
- metadata +6 -7
- data/lib/pgp-rb/3.1/pgp_rb.so +0 -0
- data/lib/pgp-rb/3.3/pgp_rb.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a462c517e2cee3b700c327effe8219773d2ddc8d3616f430c73bb3aba1c31b7
|
4
|
+
data.tar.gz: d382a0548fb88aabb1ed17f186746b9f8a716394c4e695839fc141e929ac2cb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c538b8c7cc0c3d6d0d05f5418a5ae4ce6da8bec24bcc1dd2086e4acf94dc36fb737eac45c4e7201a2f5f3ffe81c3e97c0ec0043d0e3e1576f89d081f0f0ef12f
|
7
|
+
data.tar.gz: d90b30493a74ff1847e2bd25478d1e37981de6bd6b0a7796589de49c421904b25b5ac7c18a92ec79618847ef4533f64af0082a0f8de633dec72994dec35f84db
|
data/lib/pgp-rb/3.2/pgp_rb.so
CHANGED
Binary file
|
Binary file
|
data/lib/pgp-rb/version.rb
CHANGED
data/lib/pgp.rb
CHANGED
@@ -17,7 +17,11 @@ module PGP
|
|
17
17
|
KEY_ALGORITHM_ECDSA = 19
|
18
18
|
KEY_ALGORITHM_ELGAMAL = 20
|
19
19
|
KEY_ALGORITHM_DIFFIE_HELLMAN = 21
|
20
|
-
|
20
|
+
KEY_ALGORITHM_EDDSA_LEGACY = 22
|
21
|
+
KEY_ALGORITHM_X25519 = 25
|
22
|
+
KEY_ALGORITHM_X448 = 26
|
23
|
+
KEY_ALGORITHM_ED25519 = 27
|
24
|
+
KEY_ALGORITHM_ED448 = 28
|
21
25
|
|
22
26
|
KEY_ALGORITHM_NAMES = {
|
23
27
|
KEY_ALGORITHM_RSA => 'RSA (Encrypt and Sign)',
|
@@ -29,20 +33,24 @@ module PGP
|
|
29
33
|
KEY_ALGORITHM_ECDSA => 'ECDSA: RFC-6637',
|
30
34
|
KEY_ALGORITHM_ELGAMAL => 'Elgamal (Encrypt and Sign)',
|
31
35
|
KEY_ALGORITHM_DIFFIE_HELLMAN => 'Diffie-Hellman (X9.42, as defined for IETF-S/MIME)',
|
32
|
-
|
36
|
+
KEY_ALGORITHM_EDDSA_LEGACY => 'EdDSA legacy format [deprecated in RFC 9580, superseded by Ed25519 (27)]',
|
37
|
+
KEY_ALGORITHM_X25519 => 'X25519 [RFC 9580]',
|
38
|
+
KEY_ALGORITHM_X448 => 'X448 [RFC 9580]',
|
39
|
+
KEY_ALGORITHM_ED25519 => 'Ed25519 [RFC 9580]',
|
40
|
+
KEY_ALGORITHM_ED448 => 'Ed448 [RFC 9580]'
|
33
41
|
}.freeze
|
34
42
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
ENCRIPTION_ALGORITHM_IDEA = 1
|
44
|
+
ENCRIPTION_ALGORITHM_TRIPLE_DES = 2
|
45
|
+
ENCRIPTION_ALGORITHM_CAST5 = 3
|
46
|
+
ENCRIPTION_ALGORITHM_BLOWFISH = 4
|
47
|
+
ENCRIPTION_ALGORITHM_AES_128 = 7
|
48
|
+
ENCRIPTION_ALGORITHM_AES_192 = 8
|
49
|
+
ENCRIPTION_ALGORITHM_AES_256 = 9
|
50
|
+
ENCRIPTION_ALGORITHM_TWOFISH = 10
|
51
|
+
ENCRIPTION_ALGORITHM_CAMELLIA_128 = 11
|
52
|
+
ENCRIPTION_ALGORITHM_CAMELLIA_192 = 12
|
53
|
+
ENCRIPTION_ALGORITHM_CAMELLIA_256 = 13
|
46
54
|
|
47
55
|
# Public Key class provides an native extension representation for working with PGP public keys.
|
48
56
|
class PublicKey
|
@@ -65,9 +73,9 @@ module PGP
|
|
65
73
|
# Checks if the public key supports signing.
|
66
74
|
# @return [Boolean] true if the key supports signing, false otherwise.
|
67
75
|
|
68
|
-
# @!method
|
69
|
-
# Checks if the public key supports
|
70
|
-
# @return [Boolean] true if the key supports
|
76
|
+
# @!method ENCRIPTION_supported?
|
77
|
+
# Checks if the public key supports ENCRIPTION.
|
78
|
+
# @return [Boolean] true if the key supports ENCRIPTION, false otherwise.
|
71
79
|
|
72
80
|
# @!method version
|
73
81
|
# Returns the version of the public key.
|
@@ -84,7 +92,7 @@ module PGP
|
|
84
92
|
# @!method encrypt_with_algorithm(input, algorithm)
|
85
93
|
# Encrypts data with the specified algorithm.
|
86
94
|
# @param input [String] the data to be encrypted.
|
87
|
-
# @param algorithm [Integer] the
|
95
|
+
# @param algorithm [Integer] the ENCRIPTION algorithm identifier.
|
88
96
|
# @return [String] the encrypted data encoded by base64.
|
89
97
|
|
90
98
|
# Returns a string representation of the PublicKey object, including its fingerprint, algorithm name, and version.
|
@@ -107,11 +115,11 @@ module PGP
|
|
107
115
|
expires_at.to_i <= Time.now.to_i
|
108
116
|
end
|
109
117
|
|
110
|
-
# Encrypts data using the specified
|
118
|
+
# Encrypts data using the specified ENCRIPTION algorithm.
|
111
119
|
# @param data [String] the data to be encrypted.
|
112
|
-
# @param algorithm [Integer] the
|
120
|
+
# @param algorithm [Integer] the ENCRIPTION algorithm to use, defaults to AES-128.
|
113
121
|
# @return [String] the encrypted data encoded by base64.
|
114
|
-
def encrypt(data, algorithm =
|
122
|
+
def encrypt(data, algorithm = ENCRIPTION_ALGORITHM_AES_128)
|
115
123
|
encrypt_with_algorithm(data, algorithm)
|
116
124
|
end
|
117
125
|
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.
|
4
|
+
version: 0.2.0
|
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-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -87,9 +87,8 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- lib/pgp-rb/3.1/pgp_rb.so
|
91
90
|
- lib/pgp-rb/3.2/pgp_rb.so
|
92
|
-
- lib/pgp-rb/3.
|
91
|
+
- lib/pgp-rb/3.4/pgp_rb.so
|
93
92
|
- lib/pgp-rb/version.rb
|
94
93
|
- lib/pgp.rb
|
95
94
|
homepage: https://some
|
@@ -110,17 +109,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
109
|
requirements:
|
111
110
|
- - ">="
|
112
111
|
- !ruby/object:Gem::Version
|
113
|
-
version: '3.
|
112
|
+
version: '3.2'
|
114
113
|
- - "<"
|
115
114
|
- !ruby/object:Gem::Version
|
116
|
-
version: 3.
|
115
|
+
version: 3.5.dev
|
117
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
117
|
requirements:
|
119
118
|
- - ">="
|
120
119
|
- !ruby/object:Gem::Version
|
121
120
|
version: '0'
|
122
121
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.5.23
|
124
123
|
signing_key:
|
125
124
|
specification_version: 4
|
126
125
|
summary: rPGP ruby wrapper
|
data/lib/pgp-rb/3.1/pgp_rb.so
DELETED
Binary file
|
data/lib/pgp-rb/3.3/pgp_rb.so
DELETED
Binary file
|