Lines Matching refs:m_len
220 size_t m_len; in tv_secretbox_xchacha20poly1305() local
230 m_len = strlen(tv->m) / 2; in tv_secretbox_xchacha20poly1305()
231 m = (unsigned char *) sodium_malloc(m_len); in tv_secretbox_xchacha20poly1305()
236 sodium_hex2bin(m, m_len, tv->m, strlen(tv->m), NULL, NULL, NULL); in tv_secretbox_xchacha20poly1305()
238 (crypto_secretbox_xchacha20poly1305_MACBYTES + m_len); in tv_secretbox_xchacha20poly1305()
240 (crypto_secretbox_xchacha20poly1305_MACBYTES + m_len); in tv_secretbox_xchacha20poly1305()
241 sodium_hex2bin(out, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len, in tv_secretbox_xchacha20poly1305()
244 assert(crypto_secretbox_xchacha20poly1305_easy(out2, m, m_len, nonce, key) == 0); in tv_secretbox_xchacha20poly1305()
246 crypto_secretbox_xchacha20poly1305_MACBYTES + m_len) == 0); in tv_secretbox_xchacha20poly1305()
247 n = randombytes_uniform(crypto_secretbox_xchacha20poly1305_MACBYTES + (uint32_t) m_len); in tv_secretbox_xchacha20poly1305()
256 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len, in tv_secretbox_xchacha20poly1305()
261 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len, in tv_secretbox_xchacha20poly1305()
265 (out2, out2, crypto_secretbox_xchacha20poly1305_MACBYTES + m_len, in tv_secretbox_xchacha20poly1305()
272 assert(memcmp(m, out2, m_len) == 0); in tv_secretbox_xchacha20poly1305()
275 m_len, nonce, key) == 0); in tv_secretbox_xchacha20poly1305()
278 m_len, nonce, key) == 0); in tv_secretbox_xchacha20poly1305()
281 m_len, nonce, key); in tv_secretbox_xchacha20poly1305()
283 crypto_secretbox_xchacha20poly1305_MACBYTES + m_len) == 0); in tv_secretbox_xchacha20poly1305()
312 size_t m_len; in tv_box_xchacha20poly1305() local
321 m_len = (i == 0) ? 0 : randombytes_uniform(150); in tv_box_xchacha20poly1305()
322 m = (unsigned char *) sodium_malloc(m_len); in tv_box_xchacha20poly1305()
323 m2 = (unsigned char *) sodium_malloc(m_len); in tv_box_xchacha20poly1305()
326 (crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len); in tv_box_xchacha20poly1305()
328 randombytes_buf(m, m_len); 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()
343 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len, in tv_box_xchacha20poly1305()
345 assert(memcmp(m2, m, m_len) == 0); in tv_box_xchacha20poly1305()
349 (crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len); in tv_box_xchacha20poly1305()
355 (out, m, m_len, nonce, pc) == 0); in tv_box_xchacha20poly1305()
363 (m2, out, crypto_box_curve25519xchacha20poly1305_MACBYTES + m_len, in tv_box_xchacha20poly1305()
365 assert(memcmp(m2, m, m_len) == 0); 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()
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()