diff --git a/src/sodium/cipher/aead/chalsa.cr b/src/sodium/cipher/aead/chalsa.cr index 3398ee5..74e68ec 100644 --- a/src/sodium/cipher/aead/chalsa.cr +++ b/src/sodium/cipher/aead/chalsa.cr @@ -137,11 +137,11 @@ module Sodium::Cipher::Aead dst end - protected def key_size + protected def key_size : Int32 KEY_SIZE end - protected def mac_size + protected def mac_size : Int32 MAC_SIZE end end diff --git a/src/sodium/cipher/chalsa.cr b/src/sodium/cipher/chalsa.cr index 3b7f5fc..1c1cacd 100644 --- a/src/sodium/cipher/chalsa.cr +++ b/src/sodium/cipher/chalsa.cr @@ -105,11 +105,11 @@ module Sodium::Cipher end end - def key_size + def key_size : Int32 LibSodium.crypto_stream_chacha20_ietf_keybytes.to_i32 end - def nonce_size + def nonce_size : Int32 LibSodium.crypto_stream_chacha20_ietf_noncebytes.to_i32 end end diff --git a/src/sodium/secure_buffer.cr b/src/sodium/secure_buffer.cr index a7d4248..450a6b9 100644 --- a/src/sodium/secure_buffer.cr +++ b/src/sodium/secure_buffer.cr @@ -70,7 +70,7 @@ module Sodium # Returns key # May permanently set key to readonly depending on class usage. - def to_slice + def to_slice : Bytes case @state when State::Noaccess, State::Wiped readonly