Home
last modified time | relevance | path

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

12

/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 …]
Dvboot_firmware_tests.c32 static uint32_t digest_size; variable
97 digest_size = 1234; in ResetMocks()
148 digest_size = 0; in DigestInit()
153 digest_size += len; in DigestUpdate()
400 TEST_EQ(digest_size, mpreamble[0].body_signature.data_size, in LoadFirmwareTest()
Dvb2_sha_tests.c20 uint32_t digest_size) in vb2_digest() argument
33 return vb2_digest_finalize(&dc, digest, digest_size); in vb2_digest()
/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))
Dtime_hashlib.py86 test_scaled_msg(scale=creatorFunc().digest_size, name='[digest_size data]')
/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()
D2sha_utility.c137 uint32_t digest_size) in vb2_digest_finalize() argument
139 if (digest_size < vb2_digest_size(dc->hash_alg)) in vb2_digest_finalize()
D2stub.c56 uint32_t digest_size) in vb2ex_hwcrypto_digest_finalize() argument
/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
Dhashlib.py200 dklen = outer.digest_size
204 hex_format_string = "%%0%ix" % (new(hash_name).digest_size * 2)
Dmd5.py14 digest_size = 16 variable
Dsha.py14 digest_size = 20 variable
/external/vboot_reference/firmware/lib21/
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()
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()
/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()
/external/python/cpython2/Modules/
D_hashopenssl.c222 unsigned int digest_size; in EVP_digest() local
233 digest_size = EVP_MD_CTX_size(temp_ctx); in EVP_digest()
236 retval = PyString_FromStringAndSize((const char *)digest, digest_size); in EVP_digest()
251 unsigned int i, j, digest_size; in EVP_hexdigest() local
263 digest_size = EVP_MD_CTX_size(temp_ctx); in EVP_hexdigest()
271 retval = PyString_FromStringAndSize(NULL, digest_size * 2); in EVP_hexdigest()
281 for(i=j=0; i<digest_size; i++) { in EVP_hexdigest()
/external/mmc-utils/3rdparty/hmac_sha/
Dhmac_sha2.c394 unsigned int digest_size) in test() argument
399 output[2 * digest_size] = '\0'; in test()
401 for (i = 0; i < (int) digest_size ; i++) { in test()
/external/vboot_reference/firmware/2lib/include/
D2api.h424 int vb2ex_hwcrypto_digest_finalize(uint8_t *digest, uint32_t digest_size);
D2sha.h175 uint32_t digest_size);
/external/avb/
Davbtool516 digest_size = vbmeta_header.hash_size
517 digest_blob = vbmeta_blob[digest_offset:digest_offset + digest_size]
1332 digest_size = len(hashlib.new(name=self.hash_algorithm).digest())
1333 digest_padding = round_to_pow2(digest_size) - digest_size
1335 self.image_size, self.data_block_size, digest_size + digest_padding)
2824 digest_size = len(hashlib.new(name=hash_algorithm).digest())
2831 hash_size = digest_size
2973 digest_size = len(hashlib.new(name=hash_algorithm).digest())
2974 digest_padding = round_to_pow2(digest_size) - digest_size
2981 partition_size, block_size, digest_size + digest_padding)
[all …]

12