Fix Crystal 0.31 warnings.
This commit is contained in:
parent
515ad1b722
commit
59d8d543b2
@ -137,11 +137,11 @@ module Sodium::Cipher::Aead
|
|||||||
dst
|
dst
|
||||||
end
|
end
|
||||||
|
|
||||||
protected def key_size
|
protected def key_size : Int32
|
||||||
KEY_SIZE
|
KEY_SIZE
|
||||||
end
|
end
|
||||||
|
|
||||||
protected def mac_size
|
protected def mac_size : Int32
|
||||||
MAC_SIZE
|
MAC_SIZE
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -105,11 +105,11 @@ module Sodium::Cipher
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def key_size
|
def key_size : Int32
|
||||||
LibSodium.crypto_stream_chacha20_ietf_keybytes.to_i32
|
LibSodium.crypto_stream_chacha20_ietf_keybytes.to_i32
|
||||||
end
|
end
|
||||||
|
|
||||||
def nonce_size
|
def nonce_size : Int32
|
||||||
LibSodium.crypto_stream_chacha20_ietf_noncebytes.to_i32
|
LibSodium.crypto_stream_chacha20_ietf_noncebytes.to_i32
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -70,7 +70,7 @@ module Sodium
|
|||||||
|
|
||||||
# Returns key
|
# Returns key
|
||||||
# May permanently set key to readonly depending on class usage.
|
# May permanently set key to readonly depending on class usage.
|
||||||
def to_slice
|
def to_slice : Bytes
|
||||||
case @state
|
case @state
|
||||||
when State::Noaccess, State::Wiped
|
when State::Noaccess, State::Wiped
|
||||||
readonly
|
readonly
|
||||||
|
Loading…
Reference in New Issue
Block a user