Home
last modified time | relevance | path

Searched refs:in_len (Results 1 – 25 of 118) sorted by relevance

12345

/external/boringssl/src/crypto/fipsmodule/cipher/
Daead.c106 static int check_alias(const uint8_t *in, size_t in_len, const uint8_t *out, in check_alias() argument
108 if (!buffers_alias(in, in_len, out, out_len)) { in check_alias()
117 size_t nonce_len, const uint8_t *in, size_t in_len, in EVP_AEAD_CTX_seal() argument
119 if (in_len + ctx->aead->overhead < in_len /* overflow */) { in EVP_AEAD_CTX_seal()
124 if (max_out_len < in_len) { in EVP_AEAD_CTX_seal()
129 if (!check_alias(in, in_len, out, max_out_len)) { in EVP_AEAD_CTX_seal()
135 if (ctx->aead->seal_scatter(ctx, out, out + in_len, &out_tag_len, in EVP_AEAD_CTX_seal()
136 max_out_len - in_len, nonce, nonce_len, in, in EVP_AEAD_CTX_seal()
137 in_len, NULL, 0, ad, ad_len)) { in EVP_AEAD_CTX_seal()
138 *out_len = in_len + out_tag_len; in EVP_AEAD_CTX_seal()
[all …]
Dcipher.c241 const uint8_t *in, int in_len) { in EVP_EncryptUpdate() argument
245 i = ctx->cipher->cipher(ctx, out, in, in_len); in EVP_EncryptUpdate()
254 if (in_len <= 0) { in EVP_EncryptUpdate()
256 return in_len == 0; in EVP_EncryptUpdate()
259 if (ctx->buf_len == 0 && (in_len & ctx->block_mask) == 0) { in EVP_EncryptUpdate()
260 if (ctx->cipher->cipher(ctx, out, in, in_len)) { in EVP_EncryptUpdate()
261 *out_len = in_len; in EVP_EncryptUpdate()
273 if (bl - i > in_len) { in EVP_EncryptUpdate()
274 OPENSSL_memcpy(&ctx->buf[i], in, in_len); in EVP_EncryptUpdate()
275 ctx->buf_len += in_len; in EVP_EncryptUpdate()
[all …]
De_des.c82 size_t in_len) { in des_cbc_cipher() argument
85 DES_ncbc_encrypt(in, out, in_len, &dat->ks.ks, (DES_cblock *)ctx->iv, in des_cbc_cipher()
104 size_t in_len) { in des_ecb_cipher() argument
105 if (in_len < ctx->cipher->block_size) { in des_ecb_cipher()
108 in_len -= ctx->cipher->block_size; in des_ecb_cipher()
111 for (size_t i = 0; i <= in_len; i += ctx->cipher->block_size) { in des_ecb_cipher()
150 const uint8_t *in, size_t in_len) { in des_ede3_cbc_cipher() argument
153 DES_ede3_cbc_encrypt(in, out, in_len, &dat->ks.ks[0], &dat->ks.ks[1], in des_ede3_cbc_cipher()
196 const uint8_t *in, size_t in_len) { in des_ede_ecb_cipher() argument
197 if (in_len < ctx->cipher->block_size) { in des_ede_ecb_cipher()
[all …]
/external/boringssl/src/crypto/cipher_extra/
De_aesgcmsiv.c127 const uint8_t *in, size_t in_len,
145 size_t in_len);
152 size_t in_len);
200 size_t in_len);
207 size_t in_len);
214 size_t in_len);
221 size_t in_len);
226 size_t in_len, const uint8_t *ad, size_t ad_len, in gcm_siv_asm_polyval() argument
231 const size_t in_blocks = in_len / 16; in gcm_siv_asm_polyval()
254 aesgcmsiv_htable_polyval(htable, in, in_len & ~15, out_tag); in gcm_siv_asm_polyval()
[all …]
De_chacha20poly1305.c189 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in chacha20_poly1305_seal_scatter() argument
210 const uint64_t in_len_64 = in_len; in chacha20_poly1305_seal_scatter()
225 uint32_t block_counter = 1 + (in_len / kChaChaBlockSize); in chacha20_poly1305_seal_scatter()
226 size_t offset = in_len % kChaChaBlockSize; in chacha20_poly1305_seal_scatter()
248 chacha20_poly1305_seal(out, in, in_len, ad, ad_len, &data); in chacha20_poly1305_seal_scatter()
250 CRYPTO_chacha_20(out, in, in_len, key, nonce, 1); in chacha20_poly1305_seal_scatter()
251 calc_tag(data.out.tag, key, nonce, ad, ad_len, out, in_len, out_tag, in chacha20_poly1305_seal_scatter()
263 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_chacha20_poly1305_seal_scatter() argument
270 nonce_len, in, in_len, extra_in, extra_in_len, ad, ad_len, ctx->tag_len); in aead_chacha20_poly1305_seal_scatter()
276 size_t nonce_len, const uint8_t *in, size_t in_len, const uint8_t *extra_in, in aead_xchacha20_poly1305_seal_scatter() argument
[all …]
De_tls.c103 static size_t aead_tls_tag_len(const EVP_AEAD_CTX *ctx, const size_t in_len, in aead_tls_tag_len() argument
118 const size_t pad_len = block_size - (in_len + hmac_len) % block_size; in aead_tls_tag_len()
126 const uint8_t *in, const size_t in_len, in aead_tls_seal_scatter() argument
138 if (in_len > INT_MAX) { in aead_tls_seal_scatter()
144 if (max_out_tag_len < aead_tls_tag_len(ctx, in_len, extra_in_len)) { in aead_tls_seal_scatter()
162 ad_extra[0] = (uint8_t)(in_len >> 8); in aead_tls_seal_scatter()
163 ad_extra[1] = (uint8_t)(in_len & 0xff); in aead_tls_seal_scatter()
172 !HMAC_Update(&tls_ctx->hmac_ctx, in, in_len) || in aead_tls_seal_scatter()
186 if (!EVP_EncryptUpdate(&tls_ctx->cipher_ctx, out, &len, in, (int)in_len)) { in aead_tls_seal_scatter()
196 const size_t early_mac_len = (block_size - (in_len % block_size)) % block_size; in aead_tls_seal_scatter()
[all …]
Dtls_cbc.c75 const uint8_t *in, size_t in_len, in EVP_tls_cbc_remove_padding() argument
80 if (overhead > in_len) { in EVP_tls_cbc_remove_padding()
84 size_t padding_length = in[in_len - 1]; in EVP_tls_cbc_remove_padding()
86 crypto_word_t good = constant_time_ge_w(in_len, overhead + padding_length); in EVP_tls_cbc_remove_padding()
97 if (to_check > in_len) { in EVP_tls_cbc_remove_padding()
98 to_check = in_len; in EVP_tls_cbc_remove_padding()
103 uint8_t b = in[in_len - 1 - i]; in EVP_tls_cbc_remove_padding()
118 *out_len = in_len - padding_length; in EVP_tls_cbc_remove_padding()
124 size_t in_len, size_t orig_len) { in EVP_tls_cbc_copy_mac() argument
130 size_t mac_end = in_len; in EVP_tls_cbc_copy_mac()
[all …]
/external/boringssl/src/crypto/fipsmodule/aes/
Dkey_wrap.c67 const uint8_t *in, size_t in_len) { in AES_wrap_key() argument
71 if (in_len > INT_MAX - 8 || in_len < 16 || in_len % 8 != 0) { in AES_wrap_key()
79 OPENSSL_memmove(out + 8, in, in_len); in AES_wrap_key()
83 size_t n = in_len / 8; in AES_wrap_key()
100 return (int)in_len + 8; in AES_wrap_key()
104 const uint8_t *in, size_t in_len) { in AES_unwrap_key() argument
109 if (in_len > INT_MAX || in_len < 24 || in_len % 8 != 0) { in AES_unwrap_key()
119 OPENSSL_memmove(out, in + 8, in_len - 8); in AES_unwrap_key()
121 size_t n = (in_len / 8) - 1; in AES_unwrap_key()
140 return (int)in_len - 8; in AES_unwrap_key()
/external/boringssl/src/ssl/
Dssl_aead_ctx.cc189 bool SSLAEADContext::SuffixLen(size_t *out_suffix_len, const size_t in_len, in SuffixLen() argument
195 return !!EVP_AEAD_CTX_tag_len(ctx_.get(), out_suffix_len, in_len, in SuffixLen()
199 bool SSLAEADContext::CiphertextLen(size_t *out_len, const size_t in_len, in CiphertextLen() argument
202 if (!SuffixLen(&len, in_len, extra_in_len)) { in CiphertextLen()
206 len += in_len; in CiphertextLen()
207 if (len < in_len || len >= 0xffff) { in CiphertextLen()
319 size_t in_len, const uint8_t *extra_in, in SealScatter() argument
323 if (!SuffixLen(&suffix_len, in_len, extra_in_len)) { in SealScatter()
327 if ((in != out && buffers_alias(in, in_len, out, in_len)) || in SealScatter()
328 buffers_alias(in, in_len, out_prefix, prefix_len) || in SealScatter()
[all …]
Dtls_record.cc378 const size_t in_len) { in do_seal_record() argument
390 if (!aead->SuffixLen(&suffix_len, in_len, extra_in_len) || in do_seal_record()
391 !aead->CiphertextLen(&ciphertext_len, in_len, extra_in_len)) { in do_seal_record()
396 assert(in == out || !buffers_alias(in, in_len, out, in_len)); in do_seal_record()
397 assert(!buffers_alias(in, in_len, out_prefix, ssl_record_prefix_len(ssl))); in do_seal_record()
398 assert(!buffers_alias(in, in_len, out_suffix, suffix_len)); in do_seal_record()
416 header, in, in_len, extra_in, extra_in_len) || in do_seal_record()
426 size_t in_len) { in tls_seal_scatter_prefix_len() argument
428 if (type == SSL3_RT_APPLICATION_DATA && in_len > 1 && in tls_seal_scatter_prefix_len()
443 uint8_t type, size_t in_len) { in tls_seal_scatter_suffix_len() argument
[all …]
/external/boringssl/src/crypto/base64/
Dbase64.c130 const uint8_t *in, size_t in_len) { in EVP_EncodeUpdate() argument
134 if (in_len == 0) { in EVP_EncodeUpdate()
140 if (sizeof(ctx->data) - ctx->data_used > in_len) { in EVP_EncodeUpdate()
141 OPENSSL_memcpy(&ctx->data[ctx->data_used], in, in_len); in EVP_EncodeUpdate()
142 ctx->data_used += (unsigned)in_len; in EVP_EncodeUpdate()
150 in_len -= todo; in EVP_EncodeUpdate()
162 while (in_len >= sizeof(ctx->data)) { in EVP_EncodeUpdate()
165 in_len -= sizeof(ctx->data); in EVP_EncodeUpdate()
179 if (in_len != 0) { in EVP_EncodeUpdate()
180 OPENSSL_memcpy(ctx->data, in, in_len); in EVP_EncodeUpdate()
[all …]
/external/webrtc/talk/session/media/
Dsrtpfilter.cc214 bool SrtpFilter::ProtectRtp(void* p, int in_len, int max_len, int* out_len) { in ProtectRtp() argument
220 return send_session_->ProtectRtp(p, in_len, max_len, out_len); in ProtectRtp()
224 int in_len, in ProtectRtp() argument
233 return send_session_->ProtectRtp(p, in_len, max_len, out_len, index); in ProtectRtp()
236 bool SrtpFilter::ProtectRtcp(void* p, int in_len, int max_len, int* out_len) { in ProtectRtcp() argument
242 return send_rtcp_session_->ProtectRtcp(p, in_len, max_len, out_len); in ProtectRtcp()
245 return send_session_->ProtectRtcp(p, in_len, max_len, out_len); in ProtectRtcp()
249 bool SrtpFilter::UnprotectRtp(void* p, int in_len, int* out_len) { in UnprotectRtp() argument
255 return recv_session_->UnprotectRtp(p, in_len, out_len); in UnprotectRtp()
258 bool SrtpFilter::UnprotectRtcp(void* p, int in_len, int* out_len) { in UnprotectRtcp() argument
[all …]
Dsrtpfilter.h122 bool ProtectRtp(void* data, int in_len, int max_len, int* out_len);
125 int in_len,
129 bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len);
132 bool UnprotectRtp(void* data, int in_len, int* out_len);
133 bool UnprotectRtcp(void* data, int in_len, int* out_len);
210 bool ProtectRtp(void* data, int in_len, int max_len, int* out_len);
213 int in_len,
217 bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len);
220 bool UnprotectRtp(void* data, int in_len, int* out_len);
221 bool UnprotectRtcp(void* data, int in_len, int* out_len);
[all …]
/external/boringssl/src/crypto/bn_extra/
Dconvert.c115 static int decode_hex(BIGNUM *bn, const char *in, int in_len) { in decode_hex() argument
116 if (in_len > INT_MAX/4) { in decode_hex()
121 if (!bn_expand(bn, in_len * 4)) { in decode_hex()
126 while (in_len > 0) { in decode_hex()
129 if (todo > in_len) { in decode_hex()
130 todo = in_len; in decode_hex()
136 char c = in[in_len - j]; in decode_hex()
154 in_len -= todo; in decode_hex()
162 static int decode_dec(BIGNUM *bn, const char *in, int in_len) { in decode_dec() argument
167 j = BN_DEC_NUM - (in_len % BN_DEC_NUM); in decode_dec()
[all …]
/external/boringssl/src/crypto/chacha/
Dchacha.c69 void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, in CRYPTO_chacha_20() argument
72 assert(!buffers_alias(out, in_len, in, in_len) || in == out); in CRYPTO_chacha_20()
97 ChaCha20_ctr32(out, in, in_len, key_ptr, counter_nonce); in CRYPTO_chacha_20()
136 void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, in CRYPTO_chacha_20() argument
139 assert(!buffers_alias(out, in_len, in, in_len) || in == out); in CRYPTO_chacha_20()
165 while (in_len > 0) { in CRYPTO_chacha_20()
167 if (in_len < todo) { in CRYPTO_chacha_20()
168 todo = in_len; in CRYPTO_chacha_20()
178 in_len -= todo; in CRYPTO_chacha_20()
/external/u-boot/fs/btrfs/
Dcompression.c15 u32 tot_len, in_len, res; in decompress_lzo() local
35 in_len = le32_to_cpu(get_unaligned((u32 *)cbuf)); in decompress_lzo()
39 if (in_len > clen || tot_len < 4 + in_len) in decompress_lzo()
42 tot_len -= 4 + in_len; in decompress_lzo()
45 ret = lzo1x_decompress_safe(cbuf, in_len, dbuf, &out_len); in decompress_lzo()
49 cbuf += in_len; in decompress_lzo()
50 clen -= in_len; in decompress_lzo()
/external/boringssl/src/crypto/cmac/
Dcmac.c85 const uint8_t *in, size_t in_len) { in AES_CMAC() argument
103 CMAC_Update(&ctx, in, in_len) && in AES_CMAC()
205 int CMAC_Update(CMAC_CTX *ctx, const uint8_t *in, size_t in_len) { in CMAC_Update() argument
212 if (in_len < todo) { in CMAC_Update()
213 todo = in_len; in CMAC_Update()
218 in_len -= todo; in CMAC_Update()
226 if (in_len == 0) { in CMAC_Update()
238 while (in_len > block_size) { in CMAC_Update()
243 in_len -= block_size; in CMAC_Update()
246 OPENSSL_memcpy(ctx->block, in, in_len); in CMAC_Update()
[all …]
/external/wpa_supplicant_8/src/tls/
Dtlsv1_record.c279 const u8 *in_data, size_t in_len, in tlsv1_record_receive() argument
289 if (in_len < TLS_RECORD_HEADER_LEN) { in tlsv1_record_receive()
292 (unsigned long) in_len); in tlsv1_record_receive()
294 in_data, in_len); in tlsv1_record_receive()
324 in_len -= TLS_RECORD_HEADER_LEN; in tlsv1_record_receive()
326 if (rlen > in_len) { in tlsv1_record_receive()
329 (unsigned long) rlen, (unsigned long) in_len); in tlsv1_record_receive()
346 in_len = rlen; in tlsv1_record_receive()
348 if (*out_len < in_len) { in tlsv1_record_receive()
358 out_data, in_len) < 0) { in tlsv1_record_receive()
[all …]
Dtlsv1_client_read.c23 const u8 *in_data, size_t *in_len);
25 const u8 *in_data, size_t *in_len);
27 const u8 *in_data, size_t *in_len);
79 const u8 *in_data, size_t *in_len) in tls_process_server_hello() argument
95 left = *in_len; in tls_process_server_hello()
265 *in_len = end - in_data; in tls_process_server_hello()
347 const u8 *in_data, size_t *in_len) in tls_process_certificate() argument
364 left = *in_len; in tls_process_certificate()
388 in_len); in tls_process_certificate()
391 in_len); in tls_process_certificate()
[all …]
Dtlsv1_client.c140 const u8 *in_data, size_t in_len, in tlsv1_client_handshake() argument
154 if (in_len) in tlsv1_client_handshake()
160 if (wpabuf_resize(&conn->partial_input, in_len) < 0) { in tlsv1_client_handshake()
167 wpabuf_put_data(conn->partial_input, in_data, in_len); in tlsv1_client_handshake()
169 in_len = wpabuf_len(conn->partial_input); in tlsv1_client_handshake()
172 if (in_data == NULL || in_len == 0) in tlsv1_client_handshake()
176 end = in_data + in_len; in tlsv1_client_handshake()
177 in_msg = os_malloc(in_len); in tlsv1_client_handshake()
183 in_msg_len = in_len; in tlsv1_client_handshake()
274 const u8 *in_data, size_t in_len, in tlsv1_client_encrypt() argument
[all …]
/external/boringssl/src/crypto/poly1305/
Dpoly1305_arm.c211 size_t in_len) { in CRYPTO_poly1305_update_neon() argument
221 if (todo > in_len) { in CRYPTO_poly1305_update_neon()
222 todo = in_len; in CRYPTO_poly1305_update_neon()
228 in_len -= todo; in CRYPTO_poly1305_update_neon()
231 if (st->buf_used == sizeof(st->buf) && in_len) { in CRYPTO_poly1305_update_neon()
241 while (in_len > 32) { in CRYPTO_poly1305_update_neon()
243 if (in_len < tlen) { in CRYPTO_poly1305_update_neon()
244 tlen = in_len; in CRYPTO_poly1305_update_neon()
247 in_len -= tlen; in CRYPTO_poly1305_update_neon()
251 if (in_len) { in CRYPTO_poly1305_update_neon()
[all …]
/external/webrtc/webrtc/base/
Dtransformadapter.cc64 size_t in_len = len_; in Read() local
66 StreamResult result = transform_->Transform(buffer_, &in_len, in Read()
84 len_ -= in_len; in Read()
86 memmove(buffer_, buffer_ + in_len, len_); in Read()
114 size_t in_len = data_len; in Write() local
116 StreamResult result = transform_->Transform(data, &in_len, in Write()
132 bytes_written = in_len; in Write()
/external/speex/libspeexdsp/
Dresample.c333 …e *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out… in resampler_basic_direct_single() argument
346 while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len)) in resampler_basic_direct_single()
391 …e *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out… in resampler_basic_direct_double() argument
404 while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len)) in resampler_basic_direct_double()
440 …e *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out… in resampler_basic_interpolate_single() argument
452 while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len)) in resampler_basic_interpolate_single()
503 …e *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out… in resampler_basic_interpolate_double() argument
515 while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len)) in resampler_basic_interpolate_double()
567 …e *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word16_t *out… in resampler_basic_zero() argument
577 while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len)) in resampler_basic_zero()
[all …]
/external/strace/tests-mx32/
Dioctl_sock_gifconf.c54 print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc) in print_ifconf() argument
58 print_ifc_len(in_len); in print_ifconf()
60 if (in_len != ifc->ifc_len) { in print_ifconf()
108 int in_len; in gifconf_ioctl() local
113 in_len = ifc->ifc_len; in gifconf_ioctl()
122 print_ifconf(ifc, in_len, in_buf, rc); in gifconf_ioctl()
/external/strace/tests-m32/
Dioctl_sock_gifconf.c54 print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc) in print_ifconf() argument
58 print_ifc_len(in_len); in print_ifconf()
60 if (in_len != ifc->ifc_len) { in print_ifconf()
108 int in_len; in gifconf_ioctl() local
113 in_len = ifc->ifc_len; in gifconf_ioctl()
122 print_ifconf(ifc, in_len, in_buf, rc); in gifconf_ioctl()

12345