From 5293281ca96076c0a2c060155a7e75860dd1bc26 Mon Sep 17 00:00:00 2001 From: Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> Date: Mon, 14 Jun 2021 01:44:17 -0700 Subject: [PATCH] Fix Secret::Not --- src/crypto-secret.cr | 1 + src/crypto-secret/not.cr | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 src/crypto-secret.cr diff --git a/src/crypto-secret.cr b/src/crypto-secret.cr new file mode 100644 index 0000000..3667753 --- /dev/null +++ b/src/crypto-secret.cr @@ -0,0 +1 @@ +require "./crypto-secret/crypto-secret.cr" diff --git a/src/crypto-secret/not.cr b/src/crypto-secret/not.cr index 16de597..3e7be60 100644 --- a/src/crypto-secret/not.cr +++ b/src/crypto-secret/not.cr @@ -6,15 +6,13 @@ struct Crypto::Secret::Not include Crypto::Secret - def initialize(size) - @bytes = Bytes.new size + def self.new(size) + new Bytes.new(size) end - def to_slice : Bytes - @bytes + def initialize(@bytes : Bytes) end - delegate_to_slice @bytes delegate_to_bytesize @bytes end