pgp-rb 0.1.2-aarch64-linux-musl → 0.2.0-aarch64-linux-musl

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f09073ab5941f742295315ab0cc03e3691ff3402f3a48c962379c0d24a48f4d1
4
- data.tar.gz: 4dd5ff7a98677acab9440f329077f520e399ffe9fd83a8406e30985a46628e8d
3
+ metadata.gz: e29420d36ee7e31ffc6612bb727c3ae245bd7efd3f37cf1efdf452c9aa025cbf
4
+ data.tar.gz: 8ed94be3ceb61455b69589b559550487483ceda9ef1e198bd98afbc303eb5a40
5
5
  SHA512:
6
- metadata.gz: eca00c7de8893b94905b5ed2c1c3e8404fe63e804a209451d3c28846ef769751169538e5aef44ab5c04c73d341d1cd9c9c6ec70ef172ac77a7a6804bafc818f5
7
- data.tar.gz: 72fdd0e5d877cf8ac1698d9dcc2403faad06a9df961aa876c06c26864a6f561c74e734e0bf798bf7e77dd89626e4373bb7c49d641b97458f091b08074b317b35
6
+ metadata.gz: cfd25e67b620d45df3b368ec58644126e0b80093550d69cb0e96642e87d083a56a5da77b63fb66753e25c05bd0c2491f8bf9d1c48295b4c55193243ec3347ce9
7
+ data.tar.gz: f68900174118a0388c8937395a6a0e6ca65f0e1b9e8080881a173fe3c255aab1bb7c462e5188957782a841a2f70bbfbba8cd402092c39b45f097f7468c2f54a0
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PGP
4
- VERSION = '0.1.2'
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.2
4
+ version: 0.2.0
5
5
  platform: aarch64-linux-musl
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-23 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.so
91
90
  - lib/pgp-rb/3.2/pgp_rb.so
92
- - lib/pgp-rb/3.3/pgp_rb.so
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.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: 3.3.22
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