Fix Crystal 0.31 warnings.

master
Didactic Drunk 2019-10-28 14:12:03 -07:00
parent 515ad1b722
commit 59d8d543b2
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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