Home
last modified time | relevance | path

Searched refs:use_len (Results 1 – 18 of 18) sorted by relevance

/third_party/mbedtls/tests/src/
Drandom.c79 size_t use_len; in mbedtls_test_rnd_buffer_rand() local
84 use_len = len; in mbedtls_test_rnd_buffer_rand()
86 use_len = info->length; in mbedtls_test_rnd_buffer_rand()
88 if( use_len ) in mbedtls_test_rnd_buffer_rand()
90 memcpy( output, info->buf, use_len ); in mbedtls_test_rnd_buffer_rand()
91 info->buf += use_len; in mbedtls_test_rnd_buffer_rand()
92 info->length -= use_len; in mbedtls_test_rnd_buffer_rand()
95 if( len - use_len > 0 ) in mbedtls_test_rnd_buffer_rand()
100 output + use_len, in mbedtls_test_rnd_buffer_rand()
101 len - use_len ) ); in mbedtls_test_rnd_buffer_rand()
[all …]
/third_party/mbedtls/library/
Dccm.c111 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument
128 for( i = 0; i < use_len; i++ ) in mbedtls_ccm_crypt()
273 size_t olen, use_len, offset; in mbedtls_ccm_update_ad() local
308 use_len = 16 - offset; in mbedtls_ccm_update_ad()
310 if( use_len > add_len ) in mbedtls_ccm_update_ad()
311 use_len = add_len; in mbedtls_ccm_update_ad()
313 for( i = 0; i < use_len; i++ ) in mbedtls_ccm_update_ad()
316 ctx->processed += use_len; in mbedtls_ccm_update_ad()
317 add_len -= use_len; in mbedtls_ccm_update_ad()
318 add += use_len; in mbedtls_ccm_update_ad()
[all …]
Dpem.c82 size_t use_len; in pem_pbkdf1() local
121 use_len = 16; in pem_pbkdf1()
123 use_len = keylen - 16; in pem_pbkdf1()
125 memcpy( key + 16, md5sum, use_len ); in pem_pbkdf1()
227 size_t pwdlen, size_t *use_len ) in mbedtls_pem_read_buffer() argument
267 *use_len = end - data; in mbedtls_pem_read_buffer()
439 size_t len = 0, use_len, add_len = 0; in mbedtls_pem_write_buffer() local
441 mbedtls_base64_encode( NULL, 0, &use_len, der_data, der_len ); in mbedtls_pem_write_buffer()
442 add_len = strlen( header ) + strlen( footer ) + ( use_len / 64 ) + 1; in mbedtls_pem_write_buffer()
444 if( use_len + add_len > buf_len ) in mbedtls_pem_write_buffer()
[all …]
Dgcm.c256 size_t use_len, olen = 0; in mbedtls_gcm_starts() local
288 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts()
290 for( i = 0; i < use_len; i++ ) in mbedtls_gcm_starts()
295 iv_len -= use_len; in mbedtls_gcm_starts()
296 p += use_len; in mbedtls_gcm_starts()
335 size_t use_len, i, offset; in mbedtls_gcm_update_ad() local
348 use_len = 16 - offset; in mbedtls_gcm_update_ad()
349 if( use_len > add_len ) in mbedtls_gcm_update_ad()
350 use_len = add_len; in mbedtls_gcm_update_ad()
352 for( i = 0; i < use_len; i++ ) in mbedtls_gcm_update_ad()
[all …]
Dpkcs12.c190 size_t use_len; in pkcs12_fill_buffer() local
196 use_len = ( data_len > fill_len ) ? fill_len : data_len; in pkcs12_fill_buffer()
197 memcpy( p, filler, use_len ); in pkcs12_fill_buffer()
198 p += use_len; in pkcs12_fill_buffer()
199 data_len -= use_len; in pkcs12_fill_buffer()
228 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local
305 use_len = ( datalen > hlen ) ? hlen : datalen; in mbedtls_pkcs12_derivation()
306 memcpy( p, hash_output, use_len ); in mbedtls_pkcs12_derivation()
307 datalen -= use_len; in mbedtls_pkcs12_derivation()
308 p += use_len; in mbedtls_pkcs12_derivation()
Dctr_drbg.c138 size_t buf_len, use_len; in block_cipher_df() local
179 use_len = buf_len; in block_cipher_df()
181 while( use_len > 0 ) in block_cipher_df()
186 use_len -= ( use_len >= MBEDTLS_CTR_DRBG_BLOCKSIZE ) ? in block_cipher_df()
187 MBEDTLS_CTR_DRBG_BLOCKSIZE : use_len; in block_cipher_df()
511 size_t use_len; in mbedtls_ctr_drbg_random_with_add() local
557 use_len = ( output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE ) in mbedtls_ctr_drbg_random_with_add()
562 memcpy( p, tmp, use_len ); in mbedtls_ctr_drbg_random_with_add()
563 p += use_len; in mbedtls_ctr_drbg_random_with_add()
564 output_len -= use_len; in mbedtls_ctr_drbg_random_with_add()
Dentropy_poll.c219 size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in mbedtls_nv_seed_poll() local
227 if( len < use_len ) in mbedtls_nv_seed_poll()
228 use_len = len; in mbedtls_nv_seed_poll()
230 memcpy( output, buf, use_len ); in mbedtls_nv_seed_poll()
231 *olen = use_len; in mbedtls_nv_seed_poll()
Dpkcs5.c230 size_t use_len; in mbedtls_pkcs5_pbkdf2_hmac() local
281 use_len = ( key_length < md_size ) ? key_length : md_size; in mbedtls_pkcs5_pbkdf2_hmac()
282 memcpy( out_p, work, use_len ); in mbedtls_pkcs5_pbkdf2_hmac()
284 key_length -= (uint32_t) use_len; in mbedtls_pkcs5_pbkdf2_hmac()
285 out_p += use_len; in mbedtls_pkcs5_pbkdf2_hmac()
Dentropy.c155 size_t use_len = len; in entropy_update() local
159 if( use_len > MBEDTLS_ENTROPY_BLOCK_SIZE ) in entropy_update()
169 use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in entropy_update()
173 header[1] = use_len & 0xFF; in entropy_update()
188 ret = mbedtls_sha512_update( &ctx->accumulator, p, use_len ); in entropy_update()
197 ret = mbedtls_sha256_update( &ctx->accumulator, p, use_len ); in entropy_update()
Dhmac_drbg.c359 size_t use_len = left > md_len ? md_len : left; in mbedtls_hmac_drbg_random_with_add() local
369 memcpy( out, ctx->V, use_len ); in mbedtls_hmac_drbg_random_with_add()
370 out += use_len; in mbedtls_hmac_drbg_random_with_add()
371 left -= use_len; in mbedtls_hmac_drbg_random_with_add()
Dx509_csr.c261 size_t use_len; in mbedtls_x509_csr_parse() local
279 buf, NULL, 0, &use_len ); in mbedtls_x509_csr_parse()
285 buf, NULL, 0, &use_len ); in mbedtls_x509_csr_parse()
Dx509_crl.c538 size_t use_len = 0; in mbedtls_x509_crl_parse() local
557 buf, NULL, 0, &use_len ); in mbedtls_x509_crl_parse()
566 buflen -= use_len; in mbedtls_x509_crl_parse()
567 buf += use_len; in mbedtls_x509_crl_parse()
Decjpake.c1011 size_t use_len = len > 4 ? 4 : len; in ecjpake_lgc() local
1013 memcpy( out, &x, use_len ); in ecjpake_lgc()
1014 out += use_len; in ecjpake_lgc()
1015 len -= use_len; in ecjpake_lgc()
Drsa.c1108 size_t i, use_len; in mgf_mask() local
1121 use_len = hlen; in mgf_mask()
1123 use_len = dlen; in mgf_mask()
1134 for( i = 0; i < use_len; ++i ) in mgf_mask()
1139 dlen -= use_len; in mgf_mask()
Dx509_crt.c1469 size_t use_len; in mbedtls_x509_crt_parse() local
1476 buf, NULL, 0, &use_len ); in mbedtls_x509_crt_parse()
1483 buflen -= use_len; in mbedtls_x509_crt_parse()
1484 buf += use_len; in mbedtls_x509_crt_parse()
1497 buflen -= use_len; in mbedtls_x509_crt_parse()
1498 buf += use_len; in mbedtls_x509_crt_parse()
/third_party/mbedtls/tests/suites/
Dtest_suite_pem.function41 size_t use_len = 0;
47 (unsigned char *)pwd, pwd_len, &use_len );
/third_party/mbedtls/programs/test/
Dbenchmark.c461 size_t use_len; in myrand() local
469 use_len = len; in myrand()
470 if( use_len > sizeof(int) ) in myrand()
471 use_len = sizeof(int); in myrand()
474 memcpy( output, &rnd, use_len ); in myrand()
475 output += use_len; in myrand()
476 len -= use_len; in myrand()
/third_party/mbedtls/include/mbedtls/
Dpem.h104 size_t pwdlen, size_t *use_len );