Skip to content

Commit 23ced95

Browse files
committed
dist: functest: fix randombytes
1 parent 74aa246 commit 23ced95

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

test/crypto_onetimeauth/functest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main(void)
1818
uint8_t _key[JADE_ONETIMEAUTH_KEYBYTES];
1919
uint8_t* key = _key;
2020

21-
key = randombytes(key, JADE_ONETIMEAUTH_KEYBYTES);
21+
randombytes(key, JADE_ONETIMEAUTH_KEYBYTES);
2222

2323
r = jade_onetimeauth(mac, input, sizeof(input), key);
2424
assert(r == 0);

test/crypto_scalarmult/functest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ int main(void)
2525
uint8_t secret_b[JADE_SCALARMULT_BYTES];
2626

2727
//
28-
secret_key_a = randombytes(secret_key_a, JADE_SCALARMULT_SCALARBYTES);
29-
secret_key_b = randombytes(secret_key_b, JADE_SCALARMULT_SCALARBYTES);
28+
randombytes(secret_key_a, JADE_SCALARMULT_SCALARBYTES);
29+
randombytes(secret_key_b, JADE_SCALARMULT_SCALARBYTES);
3030

3131
//
3232
r = jade_scalarmult_base(public_key_a, secret_key_a);

test/crypto_secretbox/functest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ int main(void)
2626
uint8_t* key = _key;
2727

2828
//
29-
nonce = randombytes(nonce, JADE_SECRETBOX_NONCEBYTES);
30-
key = randombytes(key, JADE_SECRETBOX_KEYBYTES);
29+
randombytes(nonce, JADE_SECRETBOX_NONCEBYTES);
30+
randombytes(key, JADE_SECRETBOX_KEYBYTES);
3131

3232
memset(plaintext_1, 0, JADE_SECRETBOX_ZEROBYTES);
3333
memcpy(&(plaintext_1[JADE_SECRETBOX_ZEROBYTES]), plaintext, sizeof(plaintext));

test/crypto_stream/functest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ int main(void)
2626
uint8_t* key = _key;
2727

2828
//
29-
nonce = randombytes(nonce, JADE_STREAM_NONCEBYTES);
30-
key = randombytes(key, JADE_STREAM_KEYBYTES);
29+
randombytes(nonce, JADE_STREAM_NONCEBYTES);
30+
randombytes(key, JADE_STREAM_KEYBYTES);
3131

3232
//
3333
r = jade_stream(stream, length, nonce, key);

0 commit comments

Comments
 (0)