-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add random secret-key/nonce generation to stream cipher and AEAD tests (
#123) * Add ability to randomly generate SecretKey and Nonce in (StreamCipher/Aead)TestRunner This must be implemented seperately from the test runner, and is therefor a pub function. The reason for this is, that the trait that let's us randomly generate these types, should only be available when testing. But since StreamCipherTestRunner is used in intergation tests (/tests), compiling it conditionally with cfg(test) would still make it inaccessible in /tests. Using cfg(debug_assertions) is not desired either, because we want to test in both release and debug mode. * (x)chacha20: Use new testing function to replace old quickcheck tests * (x)chacha20poly1305: Add tests for randomly generated secret-key/nonce. See previous commit for details * Tests: Fixed input length of 16 for new sk/n combination test. With some very small lengths, 'collisions' would occur.
- Loading branch information
Showing
6 changed files
with
119 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.