/mbedtls-development/tests/src/ |
A 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() 126 size_t use_len = ( len > 4 ) ? 4 : len; in mbedtls_test_rnd_pseudo_rand() local 139 memcpy( out, result, use_len ); in mbedtls_test_rnd_pseudo_rand() [all …]
|
/mbedtls-development/library/ |
A D | ccm.c | 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 317 add_len -= use_len; in mbedtls_ccm_update_ad() 318 add += use_len; in mbedtls_ccm_update_ad() 347 size_t use_len, offset, olen; in mbedtls_ccm_update() local 374 use_len = 16 - offset; in mbedtls_ccm_update() 376 if( use_len > input_len ) in mbedtls_ccm_update() 377 use_len = input_len; in mbedtls_ccm_update() 437 input_len -= use_len; in mbedtls_ccm_update() 438 input += use_len; in mbedtls_ccm_update() [all …]
|
A 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() 267 *use_len = end - data; in mbedtls_pem_read_buffer() 444 if( use_len + add_len > buf_len ) in mbedtls_pem_write_buffer() 446 *olen = use_len + add_len; in mbedtls_pem_write_buffer() 450 if( use_len != 0 && in mbedtls_pem_write_buffer() 454 if( ( ret = mbedtls_base64_encode( encode_buf, use_len, &use_len, der_data, in mbedtls_pem_write_buffer() 465 while( use_len ) in mbedtls_pem_write_buffer() 467 len = ( use_len > 64 ) ? 64 : use_len; in mbedtls_pem_write_buffer() [all …]
|
A D | gcm.c | 256 size_t use_len, olen = 0; in mbedtls_gcm_starts() local 293 iv_len -= use_len; in mbedtls_gcm_starts() 294 p += use_len; in mbedtls_gcm_starts() 333 size_t use_len, i, offset; in mbedtls_gcm_update_ad() local 346 use_len = 16 - offset; in mbedtls_gcm_update_ad() 348 use_len = add_len; in mbedtls_gcm_update_ad() 357 add_len -= use_len; in mbedtls_gcm_update_ad() 358 p += use_len; in mbedtls_gcm_update_ad() 478 ctx->len += use_len; in mbedtls_gcm_update() 480 p += use_len; in mbedtls_gcm_update() [all …]
|
A D | pkcs12.c | 187 size_t use_len; in pkcs12_fill_buffer() local 191 use_len = ( data_len > fill_len ) ? fill_len : data_len; in pkcs12_fill_buffer() 192 memcpy( p, filler, use_len ); in pkcs12_fill_buffer() 193 p += use_len; in pkcs12_fill_buffer() 194 data_len -= use_len; in pkcs12_fill_buffer() 212 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local 267 use_len = ( datalen > hlen ) ? hlen : datalen; in mbedtls_pkcs12_derivation() 268 memcpy( p, hash_output, use_len ); in mbedtls_pkcs12_derivation() 269 datalen -= use_len; in mbedtls_pkcs12_derivation() 270 p += use_len; in mbedtls_pkcs12_derivation()
|
A D | entropy_poll.c | 219 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()
|
A 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() 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()
|
A 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()
|
A D | entropy.c | 155 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()
|
A 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()
|
A D | hmac_drbg.c | 359 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()
|
A D | x509_crl.c | 538 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()
|
A D | ecjpake.c | 1011 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()
|
A D | x509_crt.c | 1469 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()
|
A D | rsa.c | 1122 size_t i, use_len; in mgf_mask() local 1135 use_len = hlen; in mgf_mask() 1137 use_len = dlen; in mgf_mask() 1148 for( i = 0; i < use_len; ++i ) in mgf_mask() 1153 dlen -= use_len; in mgf_mask()
|
/mbedtls-development/tests/suites/ |
A D | test_suite_pem.function | 41 size_t use_len = 0; 47 (unsigned char *)pwd, pwd_len, &use_len );
|
/mbedtls-development/include/mbedtls/ |
A D | pem.h | 104 size_t pwdlen, size_t *use_len );
|
/mbedtls-development/programs/test/ |
A D | benchmark.c | 461 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()
|