diff options
author | Jack Lloyd <[email protected]> | 2018-08-08 13:05:13 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-08 13:05:13 -0400 |
commit | 9eb10b06036840822c03aec900a1e64f90e77181 (patch) | |
tree | 3f0eb3ec3739d8779d08ac51894a2e714390d038 /src/tests/test_stream.cpp | |
parent | dfbc940e4dbc032b925e4ff54429a18e4923bbd2 (diff) |
Add StreamCipher::default_iv_length
Diffstat (limited to 'src/tests/test_stream.cpp')
-rw-r--r-- | src/tests/test_stream.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/test_stream.cpp b/src/tests/test_stream.cpp index 5b61518f5..a77db5d39 100644 --- a/src/tests/test_stream.cpp +++ b/src/tests/test_stream.cpp @@ -57,6 +57,13 @@ class Stream_Cipher_Tests final : public Text_Based_Test result.test_is_nonempty("provider", provider); result.test_eq(provider, cipher->name(), algo); + result.confirm("default iv length is valid", cipher->valid_iv_length(cipher->default_iv_length())); + + if(cipher->default_iv_length() == 0) + { + result.confirm("if default iv length is zero, no iv supported", nonce.size() == 0); + } + try { std::vector<uint8_t> buf(128); |