cryptor 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/cryptor/symmetric_encryption/secret_key.rb +3 -1
- data/lib/cryptor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96c1dcb3a7028017cafa9d5d94a7830c70dcc7a2
|
4
|
+
data.tar.gz: d704bbf77cfd13192fa7c084d30f97d9aaf3084a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00b393cf3b2122166b229ed21de3edd6885d7083a5632fdebd3966e61a7c238a71f1b5cec6c93617941d1428cc8750c7a58ec9961400fe7c0f8e0e21fa2f394f
|
7
|
+
data.tar.gz: 283a7e223cffd6f3586c0419a29fca68145870eee6e07f0856dd064eeb5ce4c4761264613cd0c3d857acef53fd52eced26406e18a2333bbe568ee5fc95b8c261
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
+
require 'uri'
|
1
2
|
require 'base64'
|
2
3
|
require 'digest/sha2'
|
4
|
+
require 'securerandom'
|
3
5
|
|
4
6
|
module Cryptor
|
5
7
|
class SymmetricEncryption
|
@@ -21,7 +23,7 @@ module Cryptor
|
|
21
23
|
else fail ArgumentError, "invalid cipher: #{cipher}"
|
22
24
|
end
|
23
25
|
|
24
|
-
bytes =
|
26
|
+
bytes = SecureRandom.random_bytes(cipher.key_bytes)
|
25
27
|
base64 = Cryptor::Encoding.encode(bytes)
|
26
28
|
|
27
29
|
new "secret.key:///#{cipher.algorithm};#{base64}"
|
data/lib/cryptor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ordo
|