/external/mbedtls/tests/src/ |
D | random.c | 79 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 …]
|
/external/openthread/third_party/mbedtls/repo/tests/src/ |
D | random.c | 79 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 …]
|
/external/mbedtls/library/ |
D | ccm.c | 111 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 …]
|
D | pem.c | 91 size_t use_len; in pem_pbkdf1() local 130 use_len = 16; in pem_pbkdf1() 132 use_len = keylen - 16; in pem_pbkdf1() 134 memcpy( key + 16, md5sum, use_len ); in pem_pbkdf1() 208 size_t use_len = 16; in pem_pbkdf1() local 210 use_len = keylen - 16; in pem_pbkdf1() 212 memcpy( key + 16, md5sum, use_len ); in pem_pbkdf1() 313 size_t pwdlen, size_t *use_len ) in mbedtls_pem_read_buffer() argument 351 *use_len = end - data; in mbedtls_pem_read_buffer() 519 size_t len = 0, use_len, add_len = 0; in mbedtls_pem_write_buffer() local [all …]
|
D | gcm.c | 240 size_t use_len, olen = 0; in mbedtls_gcm_starts() local 269 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts() 271 for( i = 0; i < use_len; i++ ) in mbedtls_gcm_starts() 276 iv_len -= use_len; in mbedtls_gcm_starts() 277 p += use_len; in mbedtls_gcm_starts() 316 size_t use_len, i, offset; in mbedtls_gcm_update_ad() local 327 use_len = 16 - offset; in mbedtls_gcm_update_ad() 328 if( use_len > add_len ) in mbedtls_gcm_update_ad() 329 use_len = add_len; in mbedtls_gcm_update_ad() 331 for( i = 0; i < use_len; i++ ) in mbedtls_gcm_update_ad() [all …]
|
D | pkcs12.c | 193 size_t use_len; in pkcs12_fill_buffer() local 199 use_len = ( data_len > fill_len ) ? fill_len : data_len; in pkcs12_fill_buffer() 200 memcpy( p, filler, use_len ); in pkcs12_fill_buffer() 201 p += use_len; in pkcs12_fill_buffer() 202 data_len -= use_len; in pkcs12_fill_buffer() 333 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local 377 use_len = ( datalen > hlen ) ? hlen : datalen; in mbedtls_pkcs12_derivation() 378 memcpy( p, hash_output, use_len ); in mbedtls_pkcs12_derivation() 379 datalen -= use_len; in mbedtls_pkcs12_derivation() 380 p += use_len; in mbedtls_pkcs12_derivation()
|
D | entropy_poll.c | 220 size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in mbedtls_nv_seed_poll() local 228 if( len < use_len ) in mbedtls_nv_seed_poll() 229 use_len = len; in mbedtls_nv_seed_poll() 231 memcpy( output, buf, use_len ); in mbedtls_nv_seed_poll() 232 *olen = use_len; in mbedtls_nv_seed_poll()
|
D | pkcs5.c | 219 size_t use_len; in pkcs5_pbkdf2_hmac() local 270 use_len = ( key_length < md_size ) ? key_length : md_size; in pkcs5_pbkdf2_hmac() 271 memcpy( out_p, work, use_len ); in pkcs5_pbkdf2_hmac() 273 key_length -= (uint32_t) use_len; in pkcs5_pbkdf2_hmac() 274 out_p += use_len; in pkcs5_pbkdf2_hmac() 336 size_t use_len, out_len; in mbedtls_pkcs5_pbkdf2_hmac_ext() 403 use_len = ( key_length < md_size ) ? key_length : md_size; in mbedtls_pkcs5_pbkdf2_hmac_ext() 404 memcpy( out_p, work, use_len ); in mbedtls_pkcs5_pbkdf2_hmac_ext() 406 key_length -= (uint32_t) use_len; in mbedtls_pkcs5_pbkdf2_hmac_ext() 407 out_p += use_len; in mbedtls_pkcs5_pbkdf2_hmac_ext()
|
D | ctr_drbg.c | 132 size_t buf_len, use_len; in block_cipher_df() local 173 use_len = buf_len; in block_cipher_df() 175 while( use_len > 0 ) in block_cipher_df() 180 use_len -= ( use_len >= MBEDTLS_CTR_DRBG_BLOCKSIZE ) ? in block_cipher_df() 181 MBEDTLS_CTR_DRBG_BLOCKSIZE : use_len; in block_cipher_df() 503 size_t use_len; in mbedtls_ctr_drbg_random_with_add() local 549 use_len = ( output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE ) in mbedtls_ctr_drbg_random_with_add() 554 memcpy( p, tmp, use_len ); in mbedtls_ctr_drbg_random_with_add() 555 p += use_len; in mbedtls_ctr_drbg_random_with_add() 556 output_len -= use_len; in mbedtls_ctr_drbg_random_with_add()
|
D | entropy.c | 146 size_t use_len = len; in entropy_update() local 150 if( use_len > MBEDTLS_ENTROPY_BLOCK_SIZE ) in entropy_update() 160 use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in entropy_update() 164 header[1] = use_len & 0xFF; in entropy_update() 179 ret = mbedtls_sha512_update( &ctx->accumulator, p, use_len ); in entropy_update() 188 ret = mbedtls_sha256_update( &ctx->accumulator, p, use_len ); in entropy_update()
|
D | x509_csr.c | 253 size_t use_len; in mbedtls_x509_csr_parse() local 271 buf, NULL, 0, &use_len ); in mbedtls_x509_csr_parse() 277 buf, NULL, 0, &use_len ); in mbedtls_x509_csr_parse()
|
D | hmac_drbg.c | 352 size_t use_len = left > md_len ? md_len : left; in mbedtls_hmac_drbg_random_with_add() local 362 memcpy( out, ctx->V, use_len ); in mbedtls_hmac_drbg_random_with_add() 363 out += use_len; in mbedtls_hmac_drbg_random_with_add() 364 left -= use_len; in mbedtls_hmac_drbg_random_with_add()
|
/external/openthread/third_party/mbedtls/repo/library/ |
D | pem.c | 82 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 …]
|
D | ccm.c | 219 size_t use_len; in ccm_auth_crypt() local 226 use_len = len_left < 16 - 2 ? len_left : 16 - 2; in ccm_auth_crypt() 227 memcpy( b + 2, src, use_len ); in ccm_auth_crypt() 228 len_left -= use_len; in ccm_auth_crypt() 229 src += use_len; in ccm_auth_crypt() 235 use_len = len_left > 16 ? 16 : len_left; in ccm_auth_crypt() 238 memcpy( b, src, use_len ); in ccm_auth_crypt() 241 len_left -= use_len; in ccm_auth_crypt() 242 src += use_len; in ccm_auth_crypt() 273 size_t use_len = len_left > 16 ? 16 : len_left; in ccm_auth_crypt() local [all …]
|
D | pkcs12.c | 235 size_t use_len; in pkcs12_fill_buffer() local 241 use_len = ( data_len > fill_len ) ? fill_len : data_len; in pkcs12_fill_buffer() 242 memcpy( p, filler, use_len ); in pkcs12_fill_buffer() 243 p += use_len; in pkcs12_fill_buffer() 244 data_len -= use_len; in pkcs12_fill_buffer() 273 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local 350 use_len = ( datalen > hlen ) ? hlen : datalen; in mbedtls_pkcs12_derivation() 351 memcpy( p, hash_output, use_len ); in mbedtls_pkcs12_derivation() 352 datalen -= use_len; in mbedtls_pkcs12_derivation() 353 p += use_len; in mbedtls_pkcs12_derivation()
|
D | gcm.c | 259 size_t use_len, olen = 0; in mbedtls_gcm_starts() local 296 use_len = ( iv_len < 16 ) ? iv_len : 16; in mbedtls_gcm_starts() 298 for( i = 0; i < use_len; i++ ) in mbedtls_gcm_starts() 303 iv_len -= use_len; in mbedtls_gcm_starts() 304 p += use_len; in mbedtls_gcm_starts() 323 use_len = ( add_len < 16 ) ? add_len : 16; in mbedtls_gcm_starts() 325 for( i = 0; i < use_len; i++ ) in mbedtls_gcm_starts() 330 add_len -= use_len; in mbedtls_gcm_starts() 331 p += use_len; in mbedtls_gcm_starts() 347 size_t use_len, olen = 0; in mbedtls_gcm_update() local [all …]
|
D | havege.c | 212 size_t use_len; in mbedtls_havege_random() local 218 use_len = len; in mbedtls_havege_random() 219 if( use_len > sizeof( val ) ) in mbedtls_havege_random() 220 use_len = sizeof( val ); in mbedtls_havege_random() 228 memcpy( p, &val, use_len ); in mbedtls_havege_random() 230 len -= use_len; in mbedtls_havege_random() 231 p += use_len; in mbedtls_havege_random()
|
D | ctr_drbg.c | 138 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() 524 size_t use_len; in mbedtls_ctr_drbg_random_with_add() local 570 use_len = ( output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE ) in mbedtls_ctr_drbg_random_with_add() 575 memcpy( p, tmp, use_len ); in mbedtls_ctr_drbg_random_with_add() 576 p += use_len; in mbedtls_ctr_drbg_random_with_add() 577 output_len -= use_len; in mbedtls_ctr_drbg_random_with_add()
|
D | entropy_poll.c | 273 size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in mbedtls_nv_seed_poll() local 281 if( len < use_len ) in mbedtls_nv_seed_poll() 282 use_len = len; in mbedtls_nv_seed_poll() 284 memcpy( output, buf, use_len ); in mbedtls_nv_seed_poll() 285 *olen = use_len; in mbedtls_nv_seed_poll()
|
D | pkcs5.c | 230 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()
|
D | entropy.c | 185 size_t use_len = len; in entropy_update() local 189 if( use_len > MBEDTLS_ENTROPY_BLOCK_SIZE ) in entropy_update() 199 use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in entropy_update() 203 header[1] = use_len & 0xFF; in entropy_update() 218 ret = mbedtls_sha512_update_ret( &ctx->accumulator, p, use_len ); in entropy_update() 227 ret = mbedtls_sha256_update_ret( &ctx->accumulator, p, use_len ); in entropy_update()
|
D | hmac_drbg.c | 368 size_t use_len = left > md_len ? md_len : left; in mbedtls_hmac_drbg_random_with_add() local 378 memcpy( out, ctx->V, use_len ); in mbedtls_hmac_drbg_random_with_add() 379 out += use_len; in mbedtls_hmac_drbg_random_with_add() 380 left -= use_len; in mbedtls_hmac_drbg_random_with_add()
|
D | x509_csr.c | 261 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()
|
/external/mbedtls/tests/suites/ |
D | test_suite_pem.function | 43 size_t use_len = 0; 50 (unsigned char *)pwd, pwd_len, &use_len ); 55 use_len = 0; 56 buf = mbedtls_pem_get_buffer( &ctx, &use_len ); 57 TEST_EQUAL( use_len, out->len );
|
/external/openthread/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_pem.function | 41 size_t use_len = 0; 47 (unsigned char *)pwd, pwd_len, &use_len );
|