eyaml 0.1.1 → 0.1.2

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: 2e61459ec54369ee49ca605cefb648f5cc8851a5d39a06ce8c9178a3d70efdf8
4
- data.tar.gz: 45c22149cb9105febb7871944e94ed662d407e3cf043132bc0e486b1e95bda82
3
+ metadata.gz: 8ea668d85b345d520177d6ca72954fe7a1da0e4bb75863c1ee6df9e0b995c90c
4
+ data.tar.gz: fba4fa173022e09f21d21b50227b7233690ceac99bbebf15490a999d819aa63e
5
5
  SHA512:
6
- metadata.gz: 2d348c4d42a142d95a8bc4017fbdf083b8254374f47e60c312af21b9790b92d8a06feb3dc43473e14cdcd79d7b2518c5b2a1165ac40918ca58ce00bd5430e5d2
7
- data.tar.gz: 57319ccb5fff1a29e49624076da3ca9a058fecfb87b47e137e006e89616bda4599d613cdb6b693421940b0483526cc7d528d25b83ea6f31557dbbbe1f164f123
6
+ metadata.gz: 4eab3d06ed10088e5544370a2dc9dc271b1f8606700d48b0ea4327682a6823ac4541e9c593f0b6334924d39cb9c72088211b514595244bfa3815dff6dfefbe88
7
+ data.tar.gz: 1e62de0de7cd54e75e1187bbaa86f63174d0126f9d977a72154b483bfd4ff411aa42019806877e49594e8c07513468ed16f5e17a84106965e911af4061c3f2c8
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- eyaml (0.1.1)
12
+ eyaml (0.1.2)
13
13
  rbnacl (~> 7.1)
14
14
  thor (~> 1.1)
15
15
 
@@ -18,8 +18,8 @@ module EYAML
18
18
 
19
19
  def initialize(yaml, public_key, private_key = nil)
20
20
  @tree = yaml
21
- @public_key = EYAML::Util.ensure_binary_encoding(public_key)
22
- @private_key = private_key.nil? ? nil : EYAML::Util.ensure_binary_encoding(private_key)
21
+ @public_key = RbNaCl::Util.hex2bin(public_key)
22
+ @private_key = private_key && RbNaCl::Util.hex2bin(private_key.strip)
23
23
  end
24
24
 
25
25
  def decrypt
data/lib/eyaml/util.rb CHANGED
@@ -6,14 +6,6 @@ module EYAML
6
6
  def pretty_yaml(some_hash)
7
7
  some_hash.to_yaml.delete_prefix("---\n")
8
8
  end
9
-
10
- def ensure_binary_encoding(str)
11
- if str.encoding == Encoding::BINARY
12
- return str
13
- end
14
-
15
- RbNaCl::Util.hex2bin(str)
16
- end
17
9
  end
18
10
  end
19
11
  end
data/lib/eyaml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EYAML
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Stolarsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-14 00:00:00.000000000 Z
11
+ date: 2021-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor