From 59d8d543b2f0bf1181cfbca7b5e2be6242835eb1 Mon Sep 17 00:00:00 2001 From: Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> Date: Mon, 28 Oct 2019 14:12:03 -0700 Subject: [PATCH] Fix Crystal 0.31 warnings. --- src/sodium/cipher/aead/chalsa.cr | 4 ++-- src/sodium/cipher/chalsa.cr | 4 ++-- src/sodium/secure_buffer.cr | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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