ffi-libsodium 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf231bf8ed108114bdd026f20c6b297d2f18ecda
4
- data.tar.gz: de5c7092f4c375780f3ccd8d0cfb277f1020a3aa
3
+ metadata.gz: 9b346ccce416e5830577e755185f792cfd63613b
4
+ data.tar.gz: 3b9ebf3532114c5dd85dd4f48bddd0c72a26691b
5
5
  SHA512:
6
- metadata.gz: bd2896b573f9f183f2f20d26a581f6d26541229c6e1865dbb86dbce8539ae0cdebc0c11f5d9e25edf99da6e21ce157646c1018d025ce757a24ead782e152fcfc
7
- data.tar.gz: da3d3010caf1eb2d2aac3b432a26ad1a6438b95eae5838007f371d37568228057c2fda6a59ea3a92b3e28f6eb286cb0f16f4862bc4993136a6d108254f0dd689
6
+ metadata.gz: 81359e298eef2fbb734bdccfa8ad24f190d74f2b47d91f9065994c73c4ed1b6e6393cda29279a065791cf5fcb8ced39e6c1b3a805c23b15c28dbb4fbf16f6778
7
+ data.tar.gz: 9b006e3addfdb329015b1ab7a1760a777fb170459ca20be0bba84758131968255fc1382641aa3dce5e4f2f6023b77d284ef4d24cfa471d83e47d6ed94c726071
data/lib/sodium.rb CHANGED
@@ -65,7 +65,7 @@ module Sodium
65
65
  bin = Sodium::Buffer.new(:uchar, bin_maxlen)
66
66
  bin_len = FFI::MemoryPointer.new(:size_t)
67
67
  if sodium_hex2bin(bin, bin_maxlen, hex, hex.bytesize, ignore, bin_len, nil) == 0
68
- size = bin_len.size == 8 ? bin_len.read_uint64 : bin_len.read_uint32
68
+ size = bin_len.size == 8 ? bin_len.get_uint64(0) : bin_len.get_uint32(0)
69
69
  [bin, size]
70
70
  else
71
71
  raise LengthError, "bin_maxlen=#{bin_maxlen} is too short", caller
@@ -75,7 +75,7 @@ module Sodium
75
75
  def hex2bin!(hex, bin_maxlen, ignore = nil)
76
76
  bin_len = FFI::MemoryPointer.new(:size_t)
77
77
  if sodium_hex2bin(hex, bin_maxlen, hex, hex.bytesize, ignore, bin_len, nil) == 0
78
- size = bin_len.size == 8 ? bin_len.read_uint64 : bin_len.read_uint32
78
+ size = bin_len.size == 8 ? bin_len.get_uint64(0) : bin_len.get_uint32(0)
79
79
  hex.slice!(size..-1)
80
80
  hex
81
81
  else
@@ -1,3 +1,3 @@
1
1
  module Sodium
2
- VERSION = Gem::Version.new('0.3.0')
2
+ VERSION = Gem::Version.new('0.3.1')
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hendrik Beskow