Home
last modified time | relevance | path

Searched refs:digest_size (Results 1 – 25 of 69) sorted by relevance

123

/external/u-boot/common/
Dhash.c51 if (size < algo->digest_size) in hash_finish_sha1()
79 if (size < algo->digest_size) in hash_finish_sha256()
106 if (size < algo->digest_size) in hash_finish_crc32()
123 .digest_size = SHA1_SUM_LEN,
144 .digest_size = SHA256_SUM_LEN,
164 .digest_size = 4,
225 for (i = 0; i < algo->digest_size; i++) { in hash_parse_string()
245 if (output_size && *output_size < algo->digest_size) { in hash_block()
247 *output_size, algo->digest_size); in hash_block()
251 *output_size = algo->digest_size; in hash_block()
[all …]
/external/vboot_reference/futility/
Dcmd_pcr.c105 int digest_size = SHA1_DIGEST_SIZE; in do_pcr() local
119 digest_size = SHA256_DIGEST_SIZE; in do_pcr()
152 parse_digest_or_die(pcr, digest_size, argv[optind]); in do_pcr()
157 print_digest(pcr, digest_size); in do_pcr()
162 parse_digest_or_die(accum + digest_size, digest_size, argv[i]); in do_pcr()
165 print_digest(accum + digest_size, digest_size); in do_pcr()
168 digest = DigestBuf(accum, digest_size * 2, digest_alg); in do_pcr()
173 memcpy(pcr, digest, digest_size); in do_pcr()
177 print_digest(pcr, digest_size); in do_pcr()
/external/vboot_reference/tests/
Dvb2_api_tests.c182 uint32_t digest_size; in get_pcr_digest_tests() local
187 digest_size = sizeof(digest); in get_pcr_digest_tests()
190 &cc, BOOT_MODE_PCR, digest, &digest_size), in get_pcr_digest_tests()
192 TEST_EQ(digest_size, VB2_SHA1_DIGEST_SIZE, "BOOT_MODE_PCR digest size"); in get_pcr_digest_tests()
193 TEST_TRUE(memcmp(digest, digest_org, digest_size), in get_pcr_digest_tests()
196 digest_size = sizeof(digest); in get_pcr_digest_tests()
199 &cc, HWID_DIGEST_PCR, digest, &digest_size), in get_pcr_digest_tests()
201 TEST_EQ(digest_size, VB2_GBB_HWID_DIGEST_SIZE, in get_pcr_digest_tests()
203 TEST_FALSE(memcmp(digest, mock_hwid_digest, digest_size), in get_pcr_digest_tests()
206 digest_size = 1; in get_pcr_digest_tests()
[all …]
/external/python/cpython2/Lib/test/
Dtest_pep247.py23 self.assertTrue(module.digest_size is None or module.digest_size > 0)
46 if not module.digest_size is None:
47 self.assertEqual(obj1.digest_size, module.digest_size)
49 self.assertEqual(obj1.digest_size, len(h1))
/external/vboot_reference/firmware/2lib/
D2api.c134 uint32_t digest_size; in vb2api_get_pcr_digest() local
139 digest_size = VB2_SHA1_DIGEST_SIZE; in vb2api_get_pcr_digest()
143 digest_size = VB2_GBB_HWID_DIGEST_SIZE; in vb2api_get_pcr_digest()
149 if (digest == NULL || *dest_size < digest_size) in vb2api_get_pcr_digest()
152 memcpy(dest, digest, digest_size); in vb2api_get_pcr_digest()
153 *dest_size = digest_size; in vb2api_get_pcr_digest()
/external/vboot_reference/host/lib/
Dhost_signature.c81 int digest_size = hash_size_map[key->algorithm]; in CalculateHash() local
90 sig = SignatureAlloc(digest_size, size); in CalculateHash()
97 Memcpy(GetSignatureData(sig), digest, digest_size); in CalculateHash()
108 int digest_size = hash_size_map[key->algorithm]; in CalculateSignature() local
114 int signature_digest_len = digest_size + digestinfo_size; in CalculateSignature()
132 Memcpy(signature_digest + digestinfo_size, digest, digest_size); in CalculateSignature()
253 uint64_t digest_size = hash_size_map[key_algorithm]; in CalculateSignature_external() local
259 uint64_t signature_digest_len = digest_size + digestinfo_size; in CalculateSignature_external()
277 Memcpy(signature_digest + digestinfo_size, digest, digest_size); in CalculateSignature_external()
Dsignature_digest.c18 const int digest_size = hash_size_map[algorithm]; in PrependDigestInfo() local
21 uint8_t* p = malloc(digestinfo_size + digest_size); in PrependDigestInfo()
23 Memcpy(p + digestinfo_size, digest, digest_size); in PrependDigestInfo()
/external/python/cpython2/Lib/
Dhmac.py16 digest_size = None variable
54 self.digest_size = self.inner.digest_size
95 other.digest_size = self.digest_size
/external/python/cpython3/Lib/test/
Dtest_hashlib.py308 self.assertEqual(len(digest), m.digest_size)
338 def check_blocksize_name(self, name, block_size=0, digest_size=0, argument
344 self.assertEqual(m.digest_size, digest_size)
351 self.assertEqual(len(m.digest()), digest_size)
352 self.assertEqual(len(m.hexdigest()), 2*digest_size)
526 digest_size, max_offset): argument
539 self.assertEqual(constructor.MAX_DIGEST_SIZE, digest_size)
540 for i in range(1, digest_size + 1):
541 constructor(digest_size=i)
542 self.assertRaises(ValueError, constructor, digest_size=-1)
[all …]
Dtest_hmac.py30 self.assertEqual(h.digest_size, 16)
37 self.assertEqual(h.digest_size, 16)
85 self.assertEqual(h.digest_size, 20)
92 self.assertEqual(h.digest_size, 20)
130 def _rfc4231_test_cases(self, hashfunc, hash_name, digest_size, block_size): argument
136 self.assertEqual(h.digest_size, digest_size)
142 self.assertEqual(h.digest_size, digest_size)
288 self.digest_size = self._x.digest_size
/external/vboot_reference/firmware/lib21/
Dcommon.c132 uint32_t digest_size = vb2_digest_size(hash_alg); in vb2_sig_size() local
135 if (!digest_size) in vb2_sig_size()
140 return digest_size; in vb2_sig_size()
269 uint32_t digest_size; in vb2_verify_data() local
278 digest_size = vb2_digest_size(key->hash_alg); in vb2_verify_data()
279 if (!digest_size) in vb2_verify_data()
282 digest = vb2_workbuf_alloc(&wblocal, digest_size); in vb2_verify_data()
299 rv = vb2_digest_finalize(dc, digest, digest_size); in vb2_verify_data()
Dapi.c124 uint32_t digest_size = vb2_digest_size(dc->hash_alg); in vb2api_check_hash() local
146 digest = vb2_workbuf_alloc(&wb, digest_size); in vb2api_check_hash()
152 rv = vb2ex_hwcrypto_digest_finalize(digest, digest_size); in vb2api_check_hash()
154 rv = vb2_digest_finalize(dc, digest, digest_size); in vb2api_check_hash()
160 digest_size)) in vb2api_check_hash()
/external/fsverity-utils/
Dcmd_setup.c119 const unsigned int digest_size = hash->alg->digest_size; in build_merkle_tree() local
169 pending_hash_bytes += digest_size; in build_merkle_tree()
174 ASSERT(pending_hash_bytes == digest_size); in build_merkle_tree()
176 digest_size); in build_merkle_tree()
181 if (pending_hash_bytes + digest_size > params->blocksize in build_merkle_tree()
247 desc_auth_len += FSVERITY_EXTLEN(params->hash_alg->digest_size); in append_fsverity_descriptor()
271 root_hash, params->hash_alg->digest_size); in append_fsverity_descriptor()
428 bin2hex(measurement, params->hash_alg->digest_size, hash_hex); in fsveritysetup()
511 ASSERT(params.hash_alg->digest_size <= FS_VERITY_MAX_DIGEST_SIZE); in fsverity_cmd_setup()
525 params.hash_alg->digest_size; in fsverity_cmd_setup()
Dcmd_measure.c36 d->digest_size = FS_VERITY_MAX_DIGEST_SIZE; in fsverity_cmd_measure()
48 ASSERT(d->digest_size <= FS_VERITY_MAX_DIGEST_SIZE); in fsverity_cmd_measure()
49 bin2hex(d->digest, d->digest_size, digest_hex); in fsverity_cmd_measure()
Dsign.c95 if (size != sizeof(*d) + hash_alg->digest_size) in compare_fsverity_digest()
101 if (le16_to_cpu(d->digest_size) != hash_alg->digest_size) in compare_fsverity_digest()
104 if (memcmp(expected_digest, d->digest, hash_alg->digest_size)) in compare_fsverity_digest()
503 params->hash_alg->digest_size; in append_signed_measurement()
510 data_to_sign->digest_size = in append_signed_measurement()
511 cpu_to_le16(params->hash_alg->digest_size); in append_signed_measurement()
513 params->hash_alg->digest_size); in append_signed_measurement()
Dhash_algs.c92 ASSERT(EVP_MD_size(md) == alg->digest_size); in openssl_digest_ctx_create()
165 .digest_size = 32,
171 .digest_size = 64,
177 .digest_size = 4,
Dfsverity_uapi.h18 __u16 digest_size; /* input/output */ member
90 __le16 digest_size; member
/external/epid-sdk/epid/member/src/
Djoin.c68 size_t digest_size = 0; in EpidCreateJoinRequest() local
112 digest_size = EpidGetHashSize(ctx->hash_alg); in EpidCreateJoinRequest()
113 digest = (uint8_t*)SAFE_ALLOC(digest_size); in EpidCreateJoinRequest()
118 sts = ResizeOctStr(&request.c, sizeof(request.c), digest, digest_size); in EpidCreateJoinRequest()
126 sts = Tpm2Sign(ctx->tpm2_ctx, digest, digest_size, ctx->join_ctr, k, s); in EpidCreateJoinRequest()
/external/python/cpython3/Lib/
Dhmac.py22 digest_size = None variable
67 self.digest_size = self.inner.digest_size
112 other.digest_size = self.digest_size
/external/python/cpython3/Modules/_blake2/clinic/
Dblake2b_impl.c.h14 py_blake2b_new_impl(PyTypeObject *type, PyObject *data, int digest_size,
27 int digest_size = BLAKE2B_OUTBYTES; in py_blake2b_new() local
40 …&data, &digest_size, &key, &salt, &person, &fanout, &depth, &leaf_size_obj, &node_offset_obj, &nod… in py_blake2b_new()
43 …return_value = py_blake2b_new_impl(type, data, digest_size, &key, &salt, &person, fanout, depth, l… in py_blake2b_new()
Dblake2s_impl.c.h14 py_blake2s_new_impl(PyTypeObject *type, PyObject *data, int digest_size,
27 int digest_size = BLAKE2S_OUTBYTES; in py_blake2s_new() local
40 …&data, &digest_size, &key, &salt, &person, &fanout, &depth, &leaf_size_obj, &node_offset_obj, &nod… in py_blake2s_new()
43 …return_value = py_blake2s_new_impl(type, data, digest_size, &key, &salt, &person, fanout, depth, l… in py_blake2s_new()
/external/scapy/scapy/layers/tls/crypto/
Dhkdf.py27 hkdf = HKDF(h, h.digest_size, salt, None, default_backend())
29 ikm = b"\x00" * h.digest_size
50 hash_len = self.hash.digest_size
54 hash_len = self.hash.digest_size
/external/vboot_reference/firmware/lib20/
Dcommon.c94 uint32_t digest_size; in vb2_verify_data() local
103 digest_size = vb2_digest_size(key->hash_alg); in vb2_verify_data()
104 if (!digest_size) in vb2_verify_data()
107 digest = vb2_workbuf_alloc(&wblocal, digest_size); in vb2_verify_data()
124 rv = vb2_digest_finalize(dc, digest, digest_size); in vb2_verify_data()
Dapi.c132 uint32_t digest_size = vb2_digest_size(dc->hash_alg); in vb2api_check_hash() local
155 digest = vb2_workbuf_alloc(&wb, digest_size); in vb2api_check_hash()
161 rv = vb2ex_hwcrypto_digest_finalize(digest, digest_size); in vb2api_check_hash()
163 rv = vb2_digest_finalize(dc, digest, digest_size); in vb2api_check_hash()
/external/vboot_reference/host/lib21/
Dhost_signature.c97 uint32_t digest_size; in vb2_sign_data() local
125 digest_size = vb2_digest_size(key->hash_alg); in vb2_sign_data()
126 if (!digest_size) in vb2_sign_data()
129 sig_digest_size = info_size + digest_size; in vb2_sign_data()
149 if (vb2_digest_finalize(&dc, sig_digest + info_size, digest_size)) { in vb2_sign_data()

123