Fix Crystal 0.31 warnings.
parent
515ad1b722
commit
59d8d543b2
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue