From 971edade77a470377d35a84e622324771627cd80 Mon Sep 17 00:00:00 2001 From: Caspian Baska Date: Wed, 20 Oct 2021 15:06:17 +1100 Subject: [PATCH] Fix `#encrypt_detached` for crystal 1.2.0 --- src/sodium/cipher/aead/chalsa.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sodium/cipher/aead/chalsa.cr b/src/sodium/cipher/aead/chalsa.cr index f9d20ff..57b7208 100644 --- a/src/sodium/cipher/aead/chalsa.cr +++ b/src/sodium/cipher/aead/chalsa.cr @@ -103,7 +103,7 @@ module Sodium::Cipher::Aead # `src` and `dst` may be the same object but should not overlap. # May supply `mac`, otherwise a new one is returned. # 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 nonce ||= Sodium::Nonce.random mac ||= Bytes.new MAC_SIZE