simple_crypt 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_crypt.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04f5e34823712ff8b60b0f0d0490afd8784b14fa6a4c8fc636727afd076fdf42
|
4
|
+
data.tar.gz: d140301f73f62f6e27672609f272b7ca70d79618619e0acfbc940cec5fd665e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b8abc6caf256a1b49dcc12f7ce92a80a30df2c1f6c4061d6df04e8104461499b2f15f04d5147d96401695e0c63f52660dbc376958eb99fe93886721a8db86c1
|
7
|
+
data.tar.gz: 0b2764ab929d922d381e17a6085d73e7654a6782ed32c7648e8dd6a3296985e80ee036c36f20334b509fe39faf381409332043315a6b0047c5267032cdb8eae8
|
data/lib/simple_crypt.rb
CHANGED
@@ -22,7 +22,7 @@ module SimpleCrypt
|
|
22
22
|
sec.iv = Base64.strict_encode64(iv)
|
23
23
|
sec.salt = Base64.strict_encode64(salt)
|
24
24
|
sec.auth_tag = Base64.strict_encode64(cipher.auth_tag)
|
25
|
-
sec.auth_data = auth_data
|
25
|
+
sec.auth_data = Base64.strict_encode64(auth_data)
|
26
26
|
sec
|
27
27
|
end
|
28
28
|
|
@@ -35,7 +35,7 @@ module SimpleCrypt
|
|
35
35
|
decipher.iv = Base64.strict_decode64(secret.iv)
|
36
36
|
decipher.key = gen_key(pwd, salt)
|
37
37
|
decipher.auth_tag = Base64.strict_decode64(secret.auth_tag)
|
38
|
-
decipher.auth_data = secret.auth_data
|
38
|
+
decipher.auth_data = Base64.strict_decode64(secret.auth_data)
|
39
39
|
|
40
40
|
begin
|
41
41
|
decrypted = decipher.update(secret_data) + decipher.final
|