pgp-rb 0.1.0-arm64-darwin → 0.1.2-arm64-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: 8533834a529a1e5502280bd7953452b72e8623b2166df4c1f304e40539abb397
4
- data.tar.gz: 42a1b791e7da86c182c7db85dffd26430ea237018d00d0102473408c3f0b30b1
3
+ metadata.gz: 6ca6954783545936585f7f100c07e68634fdf2383bc9f34a4e96fdd99ed553e4
4
+ data.tar.gz: bf89a54e00954fa5b2d118294335615328c8c8cd06213d221d99a6e6f2581221
5
5
  SHA512:
6
- metadata.gz: 001bc2e00c416ef5eabfae8211758cc826ebd907e06d2ac9edad6cb99e02b17cefec848bcf950e8a78affb53f376bb0f787da10103a977a0d73a69d84760f55d
7
- data.tar.gz: e4f3c4b4562bb798cdbc1204cb3c23e0d7afdef2b50079b29d312d71312de15a702d7a74be375b35e8bc16b2c7ed9b9f0a1e76ce32823921008c6c4274bc36c1
6
+ metadata.gz: eb5a3847498f103c59870f75fdc546792fba55918edb1de7cda03f5cfcd2fc1a632fe3e4110551750ba26a1dbc5a0cd63876cd275cdcf669df9c1ddbf5ce54da
7
+ data.tar.gz: 6cb1a7fe858acb6d1069bc2782433eb086a4f354cd3796d09a76cd965ce5695451b698ce4a511743c90be980ab17a33ed3808f565a8164f82d40799da0e274e7
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: arm64-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