diff --git a/spec/sodium/cipher/chalsa_spec.cr b/spec/sodium/cipher/chalsa_spec.cr index 525f656..a992e4c 100644 --- a/spec/sodium/cipher/chalsa_spec.cr +++ b/spec/sodium/cipher/chalsa_spec.cr @@ -19,6 +19,13 @@ require "../../../src/sodium/cipher/chalsa" cipher2.final.should eq Bytes.new(0) end + it "Random" do + cipher = Sodium::Cipher::{{ name.id }}.random + cipher.random_bytes(8).should_not eq(cipher.random_bytes(8)) + r = 3.times.map { cipher.rand(65536) }.sum + r.should_not eq(0) + end + it "dups" do cipher1 = Sodium::Cipher::{{ name.id }}.new Bytes.new(Sodium::Cipher::{{ name.id }}::KEY_SIZE) cipher2 = cipher1.dup diff --git a/spec/sodium/sign/secret_key_spec.cr b/spec/sodium/sign/secret_key_spec.cr index 7150930..ab55eb1 100644 --- a/spec/sodium/sign/secret_key_spec.cr +++ b/spec/sodium/sign/secret_key_spec.cr @@ -98,6 +98,9 @@ describe Sodium::Sign::SecretKey do end end + pending "combined test vectors" do + end + it "RbNaCl detached test vectors" do detached_test_vectors.each do |vec| seckey, plaintext, signature = sign_from_vec vec