ffi-libsodium 0.1.3 → 0.1.4

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: bc9077127b0c65b305c2cb9513a0180ee09cdc91
4
- data.tar.gz: 1ac3075143d69dd09df9090bfacf96908d7825cc
3
+ metadata.gz: 2d68ef19a8eb4cd836fef3af2609c179b51db64c
4
+ data.tar.gz: 91330c370084cd1b6a688a9858698698c295ec7c
5
5
  SHA512:
6
- metadata.gz: e6980026fbe232299ead61a8e565653a371cc89080943008cd1e8e53101f3d1c599260b093a4c5ed01da9305a3e9da89057fb3c4886c51cb3dfe6b44e28cc3e4
7
- data.tar.gz: 58f41282ad652d4c14e12b9771b001a1e95d5f420b899b941844e9d70e3c435bdc9b6c05caf9f0309c6031e28ae1ef18bcf655e3e934b8cee642f587e6b28a88
6
+ metadata.gz: f8319bb1848ae92c23352465c80660710abeb87733a2d55559e7be6166dccf1bd47819f9bb2b32b0b2efbdd334da6e96b9984abe6b46f73377cbb36a66935a3b
7
+ data.tar.gz: d9044b9a17de8563a333ecacbfbcf333032fc73c917ebf1ba0ecc8d59118c20b5f9af5d49037d0604e411718f5682625bfffb4a02f57c998e1a450d6ce0745f2
@@ -7,7 +7,6 @@ require_relative '../../sodium/secret_buffer'
7
7
  module Crypto
8
8
  module PwHash
9
9
  module ScryptSalsa208SHA256
10
- PACK_C = 'c*'.freeze
11
10
  PRIMITIVE = 'scryptsalsa208sha256'.freeze
12
11
 
13
12
  extend FFI::Library
@@ -41,7 +40,7 @@ module Crypto
41
40
 
42
41
  attach_function :crypto_pwhash_scryptsalsa208sha256, [:buffer_out, :ulong_long, :buffer_in, :ulong_long, :buffer_in, :ulong_long, :size_t], :int, blocking: true
43
42
  attach_function :crypto_pwhash_scryptsalsa208sha256_str, [:buffer_out, :buffer_in, :ulong_long, :ulong_long, :size_t], :int, blocking: true
44
- attach_function :crypto_pwhash_scryptsalsa208sha256_str_verify, [:buffer_in, :buffer_in, :ulong_long], :int, blocking: true
43
+ attach_function :crypto_pwhash_scryptsalsa208sha256_str_verify, [:string, :buffer_in, :ulong_long], :int, blocking: true
45
44
 
46
45
  module_function
47
46
 
@@ -82,7 +81,7 @@ module Crypto
82
81
  raise NoMemoryError, "Failed to allocate memory max size=#{memlimit} bytes", caller
83
82
  end
84
83
 
85
- hashed_password.read_array_of_char(STRBYTES).pack(PACK_C)
84
+ hashed_password.get_string(0)
86
85
  end
87
86
 
88
87
  def str_verify(str, passwd)
@@ -1,3 +1,3 @@
1
1
  module Sodium
2
- VERSION = Gem::Version.new('0.1.3')
2
+ VERSION = Gem::Version.new('0.1.4')
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-libsodium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hendrik Beskow