diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-12-13 16:59:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-01-17 12:43:20 -0500 |
commit | 9b0dd1ae04bb4bb3bf86fe8dd629f84a07bf5cbf (patch) | |
tree | daa8493cff72c8017f1fe9034f57c7c3f0ddb4a8 /src/test/test_crypto.c | |
parent | c3931714038e422972b80a893db0807d4d8ae937 (diff) | |
download | tor-9b0dd1ae04bb4bb3bf86fe8dd629f84a07bf5cbf.tar.gz tor-9b0dd1ae04bb4bb3bf86fe8dd629f84a07bf5cbf.zip |
Add a function to compute an XOF in one shot.
Motivation:
1. It's convenient.
2. It's all that openssl supports.
Part of 28837.
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r-- | src/test/test_crypto.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c index ec0c3cae64..556666df8d 100644 --- a/src/test/test_crypto.c +++ b/src/test/test_crypto.c @@ -1173,6 +1173,11 @@ test_crypto_sha3_xof(void *arg) crypto_xof_free(xof); memset(out, 0, sizeof(out)); + /* Test one-function absorb/squeeze. */ + crypto_xof(out, sizeof(out), msg, sizeof(msg)); + test_memeq_hex(out, squeezed_hex); + memset(out, 0, sizeof(out)); + /* Test incremental absorb/squeeze. */ xof = crypto_xof_new(); tt_assert(xof); |