pgp-rb 0.1.3-arm64-darwin → 0.2.0-arm64-darwin
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.2/pgp_rb.bundle +0 -0
- data/lib/pgp-rb/3.4/pgp_rb.bundle +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.bundle +0 -0
- data/lib/pgp-rb/3.3/pgp_rb.bundle +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c996ac0679292c62900c9669cc3820d85a09f031af7a55ee84785603c27db8aa
|
4
|
+
data.tar.gz: 6c826ba1706f8e33fdb553cfe1e0f855a5a48a466458fe9ce5507a0cd8b482aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117c7c0cbe608e5ce35c386e83f57340ac34e8e7691552d2852ef89f6ed6899bdb43d9390e36d61e9d528c35ac0cc1e70bf285cb72f85848f7f7648347d06fd8
|
7
|
+
data.tar.gz: eb27004807fcb3b00f6674d8037e93c20d933577c435376ff69a4d8bfa3126c09f8788573edb1c2d8ccccc7d2f024a5debd75130b7cd0311bd885455f539de07
|
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: arm64-darwin
|
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.bundle
|
91
90
|
- lib/pgp-rb/3.2/pgp_rb.bundle
|
92
|
-
- lib/pgp-rb/3.
|
91
|
+
- lib/pgp-rb/3.4/pgp_rb.bundle
|
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
|
Binary file
|
Binary file
|