ffi-libsodium 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: fdc92d489a260705153ce0494e12e0f1289e05ba
4
- data.tar.gz: 9fcd924e4c32a968b4a289c5f83205ec22c482d9
3
+ metadata.gz: c81230a67614e1616d64c30e469947b9131a72ac
4
+ data.tar.gz: 228b1201f0b00119fba63b04ccdd7a2f88fcc77e
5
5
  SHA512:
6
- metadata.gz: 2b0997acf74a10f0d18eb4fb72db925e38ddd69d7da98b198cc04b6d3f206ebf9d44a4ed34491c88432e0f304138cc2ee26044f9d551dde2b6e3d843ba621091
7
- data.tar.gz: b1ece50e6cd1af7c61edf6ca14ae0c77a516ca8382d52a321c0ff9dae1c44596fac4c03983cfe55ab66859be75a7923c7807af1e56cc00214a5daca9510a779c
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) > 0
59
+ if (decrypted_len = ciphertext_len - ABYTES) >= 0
60
60
  check_length(nonce, NPUBBYTES, :Nonce)
61
61
  check_length(key, KEYBYTES, :SecretKey)
62
62
 
@@ -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) > 0
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)
@@ -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) > 0
82
+ if (message_len = ciphertext_len - MACBYTES) >= 0
83
83
  check_length(nonce, NONCEBYTES, :Nonce)
84
84
  check_length(key, KEYBYTES, :SecretKey)
85
85
 
@@ -1,3 +1,3 @@
1
1
  module Sodium
2
- VERSION = Gem::Version.new('0.2.2')
2
+ VERSION = Gem::Version.new('0.2.3')
3
3
  end
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.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-19 00:00:00.000000000 Z
11
+ date: 2014-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi