crypto-secret.cr/spec/not_spec.cr

19 lines
396 B
Crystal
Raw Normal View History

2021-06-13 01:04:49 +02:00
require "./spec_helper"
2021-06-13 02:42:07 +02:00
require "../src/crypto-secret/not"
2021-06-13 01:04:49 +02:00
describe Crypto::Secret::Not do
it "works" do
ksize = 32
2021-06-13 21:52:05 +02:00
key = Bytes.new ksize
key[1] = 1_u8
secret1 = Crypto::Secret::Not.new key.dup
secret1.to_slice.should eq key
secret2 = Crypto::Secret::Not.new key.dup
(secret1 == secret2).should be_true
(secret1 == secret2.to_slice).should be_true
2021-06-13 01:04:49 +02:00
end
end