From 2893c5525d51c96232a694d4ea0256cc3f861622 Mon Sep 17 00:00:00 2001 From: Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> Date: Thu, 12 May 2022 10:13:57 -0700 Subject: [PATCH] Chalsa: Add key_size/nonce_size as class methods --- src/sodium/cipher/chalsa.cr | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sodium/cipher/chalsa.cr b/src/sodium/cipher/chalsa.cr index 053f065..854feaa 100644 --- a/src/sodium/cipher/chalsa.cr +++ b/src/sodium/cipher/chalsa.cr @@ -126,6 +126,14 @@ module Sodium::Cipher end end + def self.key_size : Int32 + KEY_SIZE + end + + def self.nonce_size : Int32 + NONCE_SIZE + end + def key_size : Int32 KEY_SIZE end