pgp-rb 0.1.0-x86_64-darwin → 0.1.2-x86_64-darwin

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: 50e8cc4e114c6f9b6a4a77db53111bda35d4928d6003dcb1305fd6404108852c
4
- data.tar.gz: 3d1afd539bae41980aaf6f3a7e4122ee22adc110436b6980929f07bc114eca24
3
+ metadata.gz: a9e505042ddf887f9acaa6e6c86f3abefc200dfa12ac76bd43fbeae63a160f53
4
+ data.tar.gz: d4a4f75a677d3b9be6db5d716d02ab296d1522bf050e8d387fcd2e8aaf77c848
5
5
  SHA512:
6
- metadata.gz: ae454535576785da17bd2d6f7d4a169a9e48e3fa283b6f7b9e77bcccfbfab9ee0d913740a77a29b854c781b8a2b4913b095cedae6c78bbb033f05ae071bcc79a
7
- data.tar.gz: 0db0b8b9111784c09172b4423a399e758e35782a68ac25438e50afc5ad5ce9fe3286f54e38debb0a7c5b1daca16dac76f2336f486e61c46aeb5a0e4ed7704d94
6
+ metadata.gz: 6e3c9cc9cb15ed9401213e53f3c96efc5763981d4de3a307b10d3066b6ecd2e3e177106a6edeca4ed0379cf80c728d76a99eca3525d0c41679b9b52be8334156
7
+ data.tar.gz: 0df08a1306461a120f5b4e30e21c88bc62098e27b159e0334f8382fee246885c2b5878c6ed62f7c1977926aae1b15223d89f6206bb6e7bca20f0a95d9bae7cf7
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PGP
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.2'
5
5
  end
data/lib/pgp.rb CHANGED
@@ -1,6 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'pgp-rb/pgp_rb'
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
- ENCRIPTION_ALGORITHM_IDEA = 1
31
- ENCRIPTION_ALGORITHM_TRIPLE_DES = 2
32
- ENCRIPTION_ALGORITHM_CAST5 = 3
33
- ENCRIPTION_ALGORITHM_BLOWFISH = 4
34
- ENCRIPTION_ALGORITHM_AES_128 = 7
35
- ENCRIPTION_ALGORITHM_AES_192 = 8
36
- ENCRIPTION_ALGORITHM_AES_256 = 9
37
- ENCRIPTION_ALGORITHM_TWOFISH = 10
38
- ENCRIPTION_ALGORITHM_CAMELLIA_128 = 11
39
- ENCRIPTION_ALGORITHM_CAMELLIA_192 = 12
40
- ENCRIPTION_ALGORITHM_CAMELLIA_256 = 13
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 = ENCRIPTION_ALGORITHM_AES_128)
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.0
4
+ version: 0.1.2
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-02-26 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry