pgp-rb 0.1.3-x86_64-darwin → 0.2.0-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ff13b78be172bf289888f255d041b75af50ca3a5c7e61ef8edd59ca966f4d15
4
- data.tar.gz: 305624a76773f09514c54cb64899c0d1d604d9a4ac4c1725366a803c68e2dc3b
3
+ metadata.gz: 8ef2d9094a884383d76e7e87906cd50c1109206f9e7ddb6086155b1356ff4031
4
+ data.tar.gz: 85e8ae20186511f4b16244c82c782e5d925440b8bd73a2ffa19fb080bd41e0ec
5
5
  SHA512:
6
- metadata.gz: dd6efd8621e802cb94e81876b911228295373dae656b3b1c3a0b093aa4f9e4fc3754a4d0eabe6038cb4db576e26149211b2b66477550a5603682e417f5cef155
7
- data.tar.gz: e381b5c8a3ea1fbcc2a66e6a689fa058c0b5c73e7f32c043440a4c52797788d1e5c778b18cdbbaed88cbf83777b7e3133d57044652e1b1c335e5fb75ea06c8fa
6
+ metadata.gz: d7f6a58c06e5f3a62f43493b2143959ec194dba2e5e955d33a281d0746e929d94ea6f19a067b91d9c0a446c7e60880a5d0b31074ee8ccf36e4c4024ebd5d43c7
7
+ data.tar.gz: 537d38e124040e7c0e0d8cf353f55c77d699d9aa20bf2854df8744b2c529465b3d674ca8d0ee750cb124065b45909d74e52120ac898e550f07cef0c8a87ba308
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PGP
4
- VERSION = '0.1.3'
4
+ VERSION = '0.2.0'
5
5
  end
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
- KEY_ALGORITHM_EDDSA = 22
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
- KEY_ALGORITHM_EDDSA => 'EdDSA'
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
- 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
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 encryption_supported?
69
- # Checks if the public key supports encryption.
70
- # @return [Boolean] true if the key supports encryption, false otherwise.
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 encryption algorithm identifier.
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 encryption algorithm.
118
+ # Encrypts data using the specified ENCRIPTION algorithm.
111
119
  # @param data [String] the data to be encrypted.
112
- # @param algorithm [Integer] the encryption algorithm to use, defaults to AES-128.
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 = ENCRYPTION_ALGORITHM_AES_128)
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.1.3
4
+ version: 0.2.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
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.3/pgp_rb.bundle
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.1'
112
+ version: '3.2'
114
113
  - - "<"
115
114
  - !ruby/object:Gem::Version
116
- version: 3.4.dev
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.4.4
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