Fix #encrypt_detached for crystal 1.2.0
This commit is contained in:
parent
b90d9bf117
commit
971edade77
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ module Sodium::Cipher::Aead
|
||||||
# `src` and `dst` may be the same object but should not overlap.
|
# `src` and `dst` may be the same object but should not overlap.
|
||||||
# May supply `mac`, otherwise a new one is returned.
|
# May supply `mac`, otherwise a new one is returned.
|
||||||
# May supply `additional`
|
# May supply `additional`
|
||||||
def encrypt_detached(src : Bytes, dst : Bytes? = nil, nonce : Sodium::Nonce? = nil, *, mac : Bytes? = nil, additional : String | Bytes | Nil = nil) : {Bytes, Bytes, Sodium::Nonce}
|
def encrypt_detached(src : Bytes, dst : Bytes? = nil, *, nonce : Sodium::Nonce? = nil, mac : Bytes? = nil, additional : String | Bytes | Nil = nil) : {Bytes, Bytes, Sodium::Nonce}
|
||||||
dst ||= Bytes.new src.bytesize
|
dst ||= Bytes.new src.bytesize
|
||||||
nonce ||= Sodium::Nonce.random
|
nonce ||= Sodium::Nonce.random
|
||||||
mac ||= Bytes.new MAC_SIZE
|
mac ||= Bytes.new MAC_SIZE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue