Lines Matching refs:used

95 	return o_stream_encrypt_send(stream, values->data, values->used);
117 i = cpu32_to_be(sizeof(IOSTREAM_CRYPT_MAGIC) + 9 + stream->cipher_oid->used + stream->mac_oid->used + 8 + stream->key_data_len);
129 return o_stream_encrypt_send(stream, values->data, values->used);
170 hash->loop(hctx, secret->data, secret->used);
172 safe_memset(buffer_get_modifiable_data(secret, 0), 0, secret->used);
188 /* NB! The old code was broken and used this kind of IV - it is not correct, but
220 s = htons(ephemeral_key->used);
222 buffer_append(res, ephemeral_key->data, ephemeral_key->used);
232 s = htons(encrypted_key->used);
234 buffer_append(res, encrypted_key->data, encrypted_key->used);
236 stream->key_data_len = res->used;
273 if (!dcrypt_pbkdf2(secret->data, secret->used, ephemeral_key->data, ephemeral_key->used,
275 safe_memset(buffer_get_modifiable_data(secret, 0), 0, secret->used);
278 safe_memset(buffer_get_modifiable_data(secret, 0), 0, secret->used);
283 safe_memset(buffer_get_modifiable_data(temp_key, 0), 0, temp_key->used);
289 i_assert(temp_key->used == 48);
293 safe_memset(buffer_get_modifiable_data(temp_key, 0), 0, temp_key->used);
316 unsigned int val = cpu32_to_be(ephemeral_key->used);
320 val = cpu32_to_be(encrypted_key->used);
395 stream->key_data_len = res->used;
412 safe_memset(buffer_get_modifiable_data(keydata, 0), 0, keydata->used);
465 if (!dcrypt_ctx_hmac_update(estream->ctx_mac, buf.data, buf.used, &error)) {
472 if (o_stream_encrypt_send(estream, buf.data, buf.used) < 0) {
508 if (buf->used > 0) {
511 if (!dcrypt_ctx_hmac_update(estream->ctx_mac, buf->data, buf->used, &error)) {
516 if (o_stream_encrypt_send(estream, buf->data, buf->used) < 0) {
530 i_assert(buf->used > 0);
532 if (buf->used > 0 && o_stream_encrypt_send(estream, buf->data, buf->used) < 0) {
631 /* MAC algorithm is used for PBKDF2 and keydata hashing */