/mbedtls-3.5.0/tests/src/ |
D | random.c | 84 size_t use_len; in mbedtls_test_rnd_buffer_rand() local 90 use_len = len; in mbedtls_test_rnd_buffer_rand() 92 use_len = info->length; in mbedtls_test_rnd_buffer_rand() 95 if (use_len) { in mbedtls_test_rnd_buffer_rand() 96 memcpy(output, info->buf, use_len); in mbedtls_test_rnd_buffer_rand() 97 info->buf += use_len; in mbedtls_test_rnd_buffer_rand() 98 info->length -= use_len; in mbedtls_test_rnd_buffer_rand() 101 if (len - use_len > 0) { in mbedtls_test_rnd_buffer_rand() 104 output + use_len, in mbedtls_test_rnd_buffer_rand() 105 len - use_len); in mbedtls_test_rnd_buffer_rand() [all …]
|
/mbedtls-3.5.0/library/ |
D | ccm.c | 114 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument 129 mbedtls_xor(output, input, tmp_buf + offset, use_len); in mbedtls_ccm_crypt() 272 size_t olen, use_len, offset; in mbedtls_ccm_update_ad() local 299 use_len = 16 - offset; in mbedtls_ccm_update_ad() 301 if (use_len > add_len) { in mbedtls_ccm_update_ad() 302 use_len = add_len; in mbedtls_ccm_update_ad() 305 mbedtls_xor(ctx->y + offset, ctx->y + offset, add, use_len); in mbedtls_ccm_update_ad() 307 ctx->processed += use_len; in mbedtls_ccm_update_ad() 308 add_len -= use_len; in mbedtls_ccm_update_ad() 309 add += use_len; in mbedtls_ccm_update_ad() [all …]
|
D | pem.c | 105 size_t use_len; in pem_pbkdf1() local 158 use_len = 16; in pem_pbkdf1() 160 use_len = keylen - 16; in pem_pbkdf1() 163 memcpy(key + 16, md5sum, use_len); in pem_pbkdf1() 243 size_t use_len = 16; in pem_pbkdf1() local 245 use_len = keylen - 16; in pem_pbkdf1() 248 memcpy(key + 16, md5sum, use_len); in pem_pbkdf1() 355 size_t pwdlen, size_t *use_len) in mbedtls_pem_read_buffer() argument 409 *use_len = end - data; in mbedtls_pem_read_buffer() 586 size_t len = 0, use_len, add_len = 0; in mbedtls_pem_write_buffer() local [all …]
|
D | gcm.c | 266 size_t use_len, olen = 0; in mbedtls_gcm_starts() local 292 use_len = (iv_len < 16) ? iv_len : 16; in mbedtls_gcm_starts() 294 mbedtls_xor(ctx->y, ctx->y, p, use_len); in mbedtls_gcm_starts() 298 iv_len -= use_len; in mbedtls_gcm_starts() 299 p += use_len; in mbedtls_gcm_starts() 336 size_t use_len, offset; in mbedtls_gcm_update_ad() local 347 use_len = 16 - offset; in mbedtls_gcm_update_ad() 348 if (use_len > add_len) { in mbedtls_gcm_update_ad() 349 use_len = add_len; in mbedtls_gcm_update_ad() 352 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, p, use_len); in mbedtls_gcm_update_ad() [all …]
|
D | pkcs12.c | 213 size_t use_len; in pkcs12_fill_buffer() local 217 use_len = (data_len > fill_len) ? fill_len : data_len; in pkcs12_fill_buffer() 218 memcpy(p, filler, use_len); in pkcs12_fill_buffer() 219 p += use_len; in pkcs12_fill_buffer() 220 data_len -= use_len; in pkcs12_fill_buffer() 359 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local 403 use_len = (datalen > hlen) ? hlen : datalen; in mbedtls_pkcs12_derivation() 404 memcpy(p, hash_output, use_len); in mbedtls_pkcs12_derivation() 405 datalen -= use_len; in mbedtls_pkcs12_derivation() 406 p += use_len; in mbedtls_pkcs12_derivation()
|
D | pkcs5.c | 236 size_t use_len; in pkcs5_pbkdf2_hmac() local 293 use_len = (key_length < md_size) ? key_length : md_size; in pkcs5_pbkdf2_hmac() 294 memcpy(out_p, work, use_len); in pkcs5_pbkdf2_hmac() 296 key_length -= (uint32_t) use_len; in pkcs5_pbkdf2_hmac() 297 out_p += use_len; in pkcs5_pbkdf2_hmac() 362 size_t use_len, out_len; in mbedtls_pkcs5_pbkdf2_hmac_ext() 435 use_len = (key_length < md_size) ? key_length : md_size; in mbedtls_pkcs5_pbkdf2_hmac_ext() 436 memcpy(out_p, work, use_len); in mbedtls_pkcs5_pbkdf2_hmac_ext() 438 key_length -= (uint32_t) use_len; in mbedtls_pkcs5_pbkdf2_hmac_ext() 439 out_p += use_len; in mbedtls_pkcs5_pbkdf2_hmac_ext()
|
D | entropy_poll.c | 219 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() 232 memcpy(output, buf, use_len); in mbedtls_nv_seed_poll() 233 *olen = use_len; in mbedtls_nv_seed_poll()
|
D | ctr_drbg.c | 136 size_t buf_len, use_len; in block_cipher_df() local 177 use_len = buf_len; in block_cipher_df() 179 while (use_len > 0) { in block_cipher_df() 182 use_len -= (use_len >= MBEDTLS_CTR_DRBG_BLOCKSIZE) ? in block_cipher_df() 183 MBEDTLS_CTR_DRBG_BLOCKSIZE : use_len; in block_cipher_df() 504 size_t use_len; in mbedtls_ctr_drbg_random_with_add() local 551 use_len = (output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE) in mbedtls_ctr_drbg_random_with_add() 556 memcpy(p, tmp, use_len); in mbedtls_ctr_drbg_random_with_add() 557 p += use_len; in mbedtls_ctr_drbg_random_with_add() 558 output_len -= use_len; in mbedtls_ctr_drbg_random_with_add()
|
D | entropy.c | 148 size_t use_len = len; in entropy_update() local 152 if (use_len > MBEDTLS_ENTROPY_BLOCK_SIZE) { in entropy_update() 163 use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; in entropy_update() 167 header[1] = use_len & 0xFF; in entropy_update() 184 ret = mbedtls_sha512_update(&ctx->accumulator, p, use_len); in entropy_update() 195 ret = mbedtls_sha256_update(&ctx->accumulator, p, use_len); in entropy_update()
|
D | hmac_drbg.c | 359 size_t use_len = left > md_len ? md_len : left; in mbedtls_hmac_drbg_random_with_add() local 372 memcpy(out, ctx->V, use_len); in mbedtls_hmac_drbg_random_with_add() 373 out += use_len; in mbedtls_hmac_drbg_random_with_add() 374 left -= use_len; in mbedtls_hmac_drbg_random_with_add()
|
D | x509_crl.c | 520 size_t use_len = 0; in mbedtls_x509_crl_parse() local 539 buf, NULL, 0, &use_len); in mbedtls_x509_crl_parse() 548 buflen -= use_len; in mbedtls_x509_crl_parse() 549 buf += use_len; in mbedtls_x509_crl_parse()
|
D | x509_csr.c | 405 size_t use_len; in mbedtls_x509_csr_parse() local 423 buf, NULL, 0, &use_len); in mbedtls_x509_csr_parse() 428 buf, NULL, 0, &use_len); in mbedtls_x509_csr_parse()
|
D | ecjpake.c | 1072 size_t use_len = len > 4 ? 4 : len; in ecjpake_lgc() local 1074 memcpy(out, &x, use_len); in ecjpake_lgc() 1075 out += use_len; in ecjpake_lgc() 1076 len -= use_len; in ecjpake_lgc()
|
D | x509_crt.c | 1316 size_t use_len; in mbedtls_x509_crt_parse() local 1323 buf, NULL, 0, &use_len); in mbedtls_x509_crt_parse() 1329 buflen -= use_len; in mbedtls_x509_crt_parse() 1330 buf += use_len; in mbedtls_x509_crt_parse() 1339 buflen -= use_len; in mbedtls_x509_crt_parse() 1340 buf += use_len; in mbedtls_x509_crt_parse()
|
D | rsa.c | 1090 size_t i, use_len; in mgf_mask() local 1125 use_len = hlen; in mgf_mask() 1127 use_len = dlen; in mgf_mask() 1159 for (i = 0; i < use_len; ++i) { in mgf_mask() 1165 dlen -= use_len; in mgf_mask()
|
/mbedtls-3.5.0/tests/suites/ |
D | test_suite_pem.function | 43 size_t use_len = 0; 50 (unsigned char *) pwd, pwd_len, &use_len); 56 use_len = 0; 57 buf = mbedtls_pem_get_buffer(&ctx, &use_len); 58 TEST_EQUAL(use_len, out->len);
|
/mbedtls-3.5.0/programs/test/ |
D | benchmark.c | 457 size_t use_len; in myrand() local 465 use_len = len; in myrand() 466 if (use_len > sizeof(int)) { in myrand() 467 use_len = sizeof(int); in myrand() 471 memcpy(output, &rnd, use_len); in myrand() 472 output += use_len; in myrand() 473 len -= use_len; in myrand()
|
/mbedtls-3.5.0/include/mbedtls/ |
D | pem.h | 107 size_t pwdlen, size_t *use_len);
|