Lines Matching refs:out
8 const char out[crypto_core_hchacha20_OUTPUTBYTES * 2 + 1]; member
36 unsigned char *out; in tv_hchacha20() local
43 out = (unsigned char *) sodium_malloc(crypto_core_hchacha20_OUTPUTBYTES); in tv_hchacha20()
51 sodium_hex2bin(out, crypto_core_hchacha20_OUTPUTBYTES, in tv_hchacha20()
52 tv->out, strlen(tv->out), NULL, NULL, NULL); in tv_hchacha20()
54 assert(memcmp(out, out2, crypto_core_hchacha20_OUTPUTBYTES) == 0); in tv_hchacha20()
60 sodium_hex2bin(out, crypto_core_hchacha20_OUTPUTBYTES, in tv_hchacha20()
65 assert(memcmp(out, out2, crypto_core_hchacha20_OUTPUTBYTES) == 0); in tv_hchacha20()
68 sodium_free(out); in tv_hchacha20()
86 const char out[XCHACHA20_OUT_MAX * 2 + 1]; member
108 unsigned char *out; in tv_stream_xchacha20() local
115 out = (unsigned char *) sodium_malloc(XCHACHA20_OUT_MAX); in tv_stream_xchacha20()
123 sodium_hex2bin(out, XCHACHA20_OUT_MAX, in tv_stream_xchacha20()
124 tv->out, strlen(tv->out), NULL, &out_len, NULL); in tv_stream_xchacha20()
127 assert(memcmp(out, out2, out_len) == 0); in tv_stream_xchacha20()
128 crypto_stream_xchacha20_xor(out2, out, out_len, nonce, key); in tv_stream_xchacha20()
130 crypto_stream_xchacha20_xor_ic(out2, out, out_len, nonce, 0, key); in tv_stream_xchacha20()
132 crypto_stream_xchacha20_xor_ic(out2, out, out_len, nonce, 1, key); in tv_stream_xchacha20()
134 crypto_stream_xchacha20_xor(out, out, out_len, nonce, key); in tv_stream_xchacha20()
135 assert(sodium_is_zero(out, out_len)); in tv_stream_xchacha20()
144 sodium_free(out); in tv_stream_xchacha20()
146 out = (unsigned char *) sodium_malloc(64); in tv_stream_xchacha20()
148 randombytes_buf(out, 64); in tv_stream_xchacha20()
150 memcpy(out2 + 64, out, 64); in tv_stream_xchacha20()
151 crypto_stream_xchacha20_xor_ic(out, out, 64, nonce, 1, key); in tv_stream_xchacha20()
153 assert(memcmp(out, out2 + 64, 64) == 0); in tv_stream_xchacha20()
154 sodium_free(out); in tv_stream_xchacha20()
157 out = (unsigned char *) sodium_malloc(192); in tv_stream_xchacha20()
159 memset(out, 0, 192); in tv_stream_xchacha20()
163 crypto_stream_xchacha20_xor_ic(out, out, 64, nonce, in tv_stream_xchacha20()
165 crypto_stream_xchacha20_xor_ic(out + 64, out + 64, 64, nonce, in tv_stream_xchacha20()
167 crypto_stream_xchacha20_xor_ic(out + 128, out + 128, 64, nonce, in tv_stream_xchacha20()
169 assert(memcmp(out, out2, 192) == 0); in tv_stream_xchacha20()
171 sodium_bin2hex(hex, 192 * 2 + 1, out, 192); in tv_stream_xchacha20()
179 sodium_free(out); in tv_stream_xchacha20()
196 const char *out; member
218 unsigned char *out; in tv_secretbox_xchacha20poly1305() local
237 out = (unsigned char *) sodium_malloc in tv_secretbox_xchacha20poly1305()
241 sodium_hex2bin(out, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len, in tv_secretbox_xchacha20poly1305()
242 tv->out, strlen(tv->out), NULL, NULL, NULL); in tv_secretbox_xchacha20poly1305()
245 assert(memcmp(out, out2, in tv_secretbox_xchacha20poly1305()
274 (out2, out + crypto_secretbox_xchacha20poly1305_MACBYTES, out, in tv_secretbox_xchacha20poly1305()
277 (NULL, out + crypto_secretbox_xchacha20poly1305_MACBYTES, out, in tv_secretbox_xchacha20poly1305()
282 assert(memcmp(out, out2, in tv_secretbox_xchacha20poly1305()
284 sodium_free(out); in tv_secretbox_xchacha20poly1305()
309 unsigned char *out; in tv_box_xchacha20poly1305() local
325 out = (unsigned char *) sodium_malloc in tv_box_xchacha20poly1305()
330 assert(crypto_box_curve25519xchacha20poly1305_easy(out, m, 0, nonce, in tv_box_xchacha20poly1305()
332 assert(crypto_box_curve25519xchacha20poly1305_easy(out, m, m_len, nonce, in tv_box_xchacha20poly1305()
335 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len, in tv_box_xchacha20poly1305()
338 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES - 1, in tv_box_xchacha20poly1305()
341 (m2, out, 0, nonce, pk, sk) == -1); in tv_box_xchacha20poly1305()
343 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len, in tv_box_xchacha20poly1305()
346 sodium_free(out); in tv_box_xchacha20poly1305()
348 out = (unsigned char *) sodium_malloc in tv_box_xchacha20poly1305()
353 (out, m, 0, nonce, pc) == 0); in tv_box_xchacha20poly1305()
355 (out, m, m_len, nonce, pc) == 0); in tv_box_xchacha20poly1305()
357 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES - 1, in tv_box_xchacha20poly1305()
360 (m2, out, 0, in tv_box_xchacha20poly1305()
363 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len, in tv_box_xchacha20poly1305()
366 sodium_free(out); in tv_box_xchacha20poly1305()
368 out = (unsigned char *) sodium_malloc(m_len); in tv_box_xchacha20poly1305()
369 assert(crypto_box_curve25519xchacha20poly1305_detached(out, mac, m, m_len, in tv_box_xchacha20poly1305()
371 assert(crypto_box_curve25519xchacha20poly1305_detached(out, mac, m, m_len, in tv_box_xchacha20poly1305()
374 (m2, out, mac, m_len, nonce, small_order_p, sk) == -1); in tv_box_xchacha20poly1305()
376 (m2, out, mac, m_len, nonce, pk, sk) == 0); in tv_box_xchacha20poly1305()
377 sodium_free(out); in tv_box_xchacha20poly1305()
379 out = (unsigned char *) sodium_malloc(m_len); in tv_box_xchacha20poly1305()
381 (out, mac, m, m_len, nonce, pc) == 0); in tv_box_xchacha20poly1305()
383 (m2, out, mac, m_len, nonce, pc) == 0); in tv_box_xchacha20poly1305()
384 sodium_free(out); in tv_box_xchacha20poly1305()