Lines Matching defs:out2
37 unsigned char *out2;
44 out2 = (unsigned char *) sodium_malloc(crypto_core_hchacha20_OUTPUTBYTES);
53 crypto_core_hchacha20(out2, in, key, NULL);
54 assert(memcmp(out, out2, crypto_core_hchacha20_OUTPUTBYTES) == 0);
64 crypto_core_hchacha20(out2, in, key, constant);
65 assert(memcmp(out, out2, crypto_core_hchacha20_OUTPUTBYTES) == 0);
67 sodium_free(out2);
109 unsigned char *out2;
125 out2 = (unsigned char *) sodium_malloc(out_len);
126 crypto_stream_xchacha20(out2, out_len, nonce, key);
127 assert(memcmp(out, out2, out_len) == 0);
128 crypto_stream_xchacha20_xor(out2, out, out_len, nonce, key);
129 assert(sodium_is_zero(out2, out_len));
130 crypto_stream_xchacha20_xor_ic(out2, out, out_len, nonce, 0, key);
131 assert(sodium_is_zero(out2, out_len));
132 crypto_stream_xchacha20_xor_ic(out2, out, out_len, nonce, 1, key);
133 assert(!sodium_is_zero(out2, out_len));
136 sodium_free(out2);
139 out2 = (unsigned char *) sodium_malloc(0);
140 crypto_stream_xchacha20(out2, 0, nonce, key);
141 crypto_stream_xchacha20_xor(out2, out2, 0, nonce, key);
142 crypto_stream_xchacha20_xor_ic(out2, out2, 0, nonce, 1, key);
143 sodium_free(out2);
147 out2 = (unsigned char *) sodium_malloc(128);
149 randombytes_buf(out2, 64);
150 memcpy(out2 + 64, out, 64);
152 crypto_stream_xchacha20_xor(out2, out2, 128, nonce, key);
153 assert(memcmp(out, out2 + 64, 64) == 0);
155 sodium_free(out2);
158 out2 = (unsigned char *) sodium_malloc(192);
160 memset(out2, 0, 192);
161 crypto_stream_xchacha20_xor_ic(out2, out2, 192, nonce,
169 assert(memcmp(out, out2, 192) == 0);
180 sodium_free(out2);
219 unsigned char *out2;
239 out2 = (unsigned char *) sodium_malloc
243 assert(crypto_secretbox_xchacha20poly1305_easy(out2, m, 0, nonce, key) == 0);
244 assert(crypto_secretbox_xchacha20poly1305_easy(out2, m, m_len, nonce, key) == 0);
245 assert(memcmp(out, out2,
249 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES - 1,
252 (out2, out2, 0,
254 out2[n]++;
256 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len,
258 out2[n]--;
261 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len,
265 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len,
268 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES - 1,
271 (out2, out2, 0, nonce, key) == -1);
272 assert(memcmp(m, out2, m_len) == 0);
274 (out2, out + crypto_secretbox_xchacha20poly1305_MACBYTES, out,
280 (out2 + crypto_secretbox_xchacha20poly1305_MACBYTES, out2, m,
282 assert(memcmp(out, out2,
285 sodium_free(out2);