Home
last modified time | relevance | path

Searched refs:nb (Results 1 – 3 of 3) sorted by relevance

/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_bignum_mod_raw.function30 size_t nb = nb_int;
33 TEST_LE_U(nb, sizeof(buf));
72 ret = mbedtls_mpi_mod_raw_write(X, &m, buf, nb, endian);
77 if (nb > input->len) {
79 size_t leading_zeroes = nb - input->len;
80 TEST_ASSERT(memcmp(buf + nb - input->len, input->x, input->len) == 0);
86 for (size_t i = input->len; i < nb; i++) {
92 size_t leading_zeroes = input->len - nb;
93 TEST_ASSERT(memcmp(input->x + input->len - nb, buf, nb) == 0);
98 TEST_ASSERT(memcmp(input->x, buf, nb) == 0);
[all …]
Dtest_suite_bignum_core.function197 size_t nb = nb_int;
200 TEST_LE_U(nb, sizeof(buf));
219 ret = mbedtls_mpi_core_write_be(X, nx, buf, nb);
224 if (nb > input->len) {
225 size_t leading_zeroes = nb - input->len;
226 TEST_ASSERT(memcmp(buf + nb - input->len, input->x, input->len) == 0);
231 size_t leading_zeroes = input->len - nb;
232 TEST_ASSERT(memcmp(input->x + input->len - nb, buf, nb) == 0);
253 size_t nb = nb_int;
256 TEST_LE_U(nb, sizeof(buf));
[all …]
/openthread-latest/third_party/mbedtls/repo/library/
Dssl_tls.c6832 size_t nb; in tls_prf_generic() local
6856 nb = strlen(label); in tls_prf_generic()
6857 memcpy(tmp + md_len, label, nb); in tls_prf_generic()
6858 memcpy(tmp + md_len + nb, random, rlen); in tls_prf_generic()
6859 nb += rlen; in tls_prf_generic()
6872 ret = mbedtls_md_hmac_update(&md_ctx, tmp + md_len, nb); in tls_prf_generic()
6886 ret = mbedtls_md_hmac_update(&md_ctx, tmp, md_len + nb); in tls_prf_generic()