Merge pull request #3 from taylorfinnell/crystal-0.24.1-updates
fixes for 0.24.1
This commit is contained in:
commit
0755096341
@ -4,6 +4,6 @@ version: 0.1.0
|
|||||||
authors:
|
authors:
|
||||||
- Andrew Hamon <andrew@hamon.cc>
|
- Andrew Hamon <andrew@hamon.cc>
|
||||||
|
|
||||||
crystal: 0.23.0
|
crystal: 0.24.1
|
||||||
|
|
||||||
license: MIT
|
license: MIT
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
require "./cox/*"
|
require "./cox/*"
|
||||||
require "secure_random"
|
|
||||||
|
|
||||||
module Cox
|
module Cox
|
||||||
def self.encrypt(data, nonce : Nonce, recipient_public_key : PublicKey, sender_secret_key : SecretKey)
|
def self.encrypt(data, nonce : Nonce, recipient_public_key : PublicKey, sender_secret_key : SecretKey)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
require "./lib_sodium"
|
require "./lib_sodium"
|
||||||
require "secure_random"
|
require "random/secure"
|
||||||
|
|
||||||
module Cox
|
module Cox
|
||||||
class Nonce
|
class Nonce
|
||||||
@ -14,7 +14,7 @@ module Cox
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.new
|
def self.new
|
||||||
new(SecureRandom.random_bytes(NONCE_LENGTH))
|
new(Random::Secure.random_bytes(NONCE_LENGTH))
|
||||||
end
|
end
|
||||||
|
|
||||||
def pointer
|
def pointer
|
||||||
|
Loading…
Reference in New Issue
Block a user