ffi-libsodium 0.2.2 → 0.2.3
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 +4 -4
- data/lib/crypto/aead/chacha20_poly1305.rb +1 -1
- data/lib/crypto/box.rb +1 -1
- data/lib/crypto/secret_box.rb +1 -1
- data/lib/sodium/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: c81230a67614e1616d64c30e469947b9131a72ac
|
4
|
+
data.tar.gz: 228b1201f0b00119fba63b04ccdd7a2f88fcc77e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36f6b18d630b803b43cd094647ac5c332f599ab668c5df340ac02237742cc91770b644b2030db00e3611d975b10afd3ec10e9752ecac92dc781e9e560d8c5e6
|
7
|
+
data.tar.gz: 0b54875b9bc202e53714a8be00078e847843c4e255902e82aacf3f464d55cd6256a36559de82a1bf1d088b51a073277a6175d1788f23f314381004b3c985d30d
|
@@ -56,7 +56,7 @@ module Crypto
|
|
56
56
|
|
57
57
|
def decrypt(ciphertext, additional_data, nonce, key)
|
58
58
|
ciphertext_len = get_size(ciphertext)
|
59
|
-
if (decrypted_len = ciphertext_len - ABYTES)
|
59
|
+
if (decrypted_len = ciphertext_len - ABYTES) >= 0
|
60
60
|
check_length(nonce, NPUBBYTES, :Nonce)
|
61
61
|
check_length(key, KEYBYTES, :SecretKey)
|
62
62
|
|
data/lib/crypto/box.rb
CHANGED
@@ -133,7 +133,7 @@ module Crypto
|
|
133
133
|
def open_easy_in_place(data, nonce, public_key, secret_key, encoding = nil)
|
134
134
|
ciphertext = String(data)
|
135
135
|
ciphertext_len = ciphertext.bytesize
|
136
|
-
if (message_len = ciphertext_len - MACBYTES)
|
136
|
+
if (message_len = ciphertext_len - MACBYTES) >= 0
|
137
137
|
check_length(nonce, NONCEBYTES, :Nonce)
|
138
138
|
check_length(public_key, PUBLICKEYBYTES, :PublicKey)
|
139
139
|
check_length(secret_key, SECRETKEYBYTES, :SecretKey)
|
data/lib/crypto/secret_box.rb
CHANGED
@@ -79,7 +79,7 @@ module Crypto
|
|
79
79
|
def open_easy_in_place(data, nonce, key, encoding = nil)
|
80
80
|
ciphertext = String(data)
|
81
81
|
ciphertext_len = ciphertext.bytesize
|
82
|
-
if (message_len = ciphertext_len - MACBYTES)
|
82
|
+
if (message_len = ciphertext_len - MACBYTES) >= 0
|
83
83
|
check_length(nonce, NONCEBYTES, :Nonce)
|
84
84
|
check_length(key, KEYBYTES, :SecretKey)
|
85
85
|
|
data/lib/sodium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-libsodium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendrik Beskow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|