Skip to content

Commit

Permalink
Merge fa91153 into ad1cd17
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Sep 10, 2013
2 parents ad1cd17 + fa91153 commit d75b4b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions lib/rbnacl/nacl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,19 @@ def self.#{name}(*args)

ONETIME_KEYBYTES = 32
ONETIME_BYTES = 16
if NaCl.supported_version? :libsodium, '0.4.3'
crypto_onetimeauth_poly1305 = :crypto_onetimeauth_poly1305
crypto_onetimeauth_poly1305_verify = :crypto_onetimeauth_poly1305_verify
else
crypto_onetimeauth_poly1305 = :crypto_onetimeauth_poly1305_ref
crypto_onetimeauth_poly1305_verify = :crypto_onetimeauth_poly1305_verify_ref
end

wrap_nacl_function :crypto_auth_onetime,
:crypto_onetimeauth_poly1305_ref,
crypto_onetimeauth_poly1305,
[:pointer, :pointer, :long_long, :pointer]
wrap_nacl_function :crypto_auth_onetime_verify,
:crypto_onetimeauth_poly1305_ref_verify,
crypto_onetimeauth_poly1305_verify,
[:pointer, :pointer, :long_long, :pointer]

wrap_nacl_function :random_bytes,
Expand Down
4 changes: 2 additions & 2 deletions lib/rbnacl/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require 'rake/clean'
require 'digest/sha2'

LIBSODIUM_VERSION = "0.4.2"
LIBSODIUM_DIGEST = "1a7901cdd127471724e854a8eb478247dc0ca67be549345c75fc6f2d4e05ed39"
LIBSODIUM_VERSION = "0.4.3"
LIBSODIUM_DIGEST = "599ce19ae6ace2d30aee353b931088f720713c4e1d0b2918ed46de1914fb6042"

def sh_hidden(command)
STDERR.puts("*** Executing: #{command}")
Expand Down

0 comments on commit d75b4b2

Please sign in to comment.