Home
last modified time | relevance | path

Searched refs:digest (Results 1 – 25 of 36) sorted by relevance

12

/tools/tradefederation/core/common_util/com/android/tradefed/cache/remote/
DByteStreamDownloader.java69 public ListenableFuture<Void> downloadBlob(Digest digest, OutputStream out) { in downloadBlob() argument
70 if (digest.getSizeBytes() == 0) { in downloadBlob()
76 read(digest, new CountingOutputStream(out)), in downloadBlob()
78 if (bytesRead != digest.getSizeBytes()) { in downloadBlob()
85 digest.getSizeBytes(), in downloadBlob()
86 getResourceName(digest)))); in downloadBlob()
96 private ListenableFuture<Long> read(Digest digest, CountingOutputStream out) {
101 .setResourceName(getResourceName(digest))
116 if (out.getCount() == digest.getSizeBytes()) {
150 private String getResourceName(Digest digest) {
[all …]
/tools/asuite/adevice/src/
Dfingerprint.rs6 use ring::digest::{self, SHA256};
48 pub digest: String, field
108 let (digest, cache_key) = get_or_compute_digest(file_path, metadata, cache)?; in from_file()
111 digest, in from_file()
242 let mut context = digest::Context::new(&SHA256); in compute_digest()
263 let digest; in get_or_compute_digest() localVariable
265 digest = cached_digest.to_string(); in get_or_compute_digest()
267 digest = compute_digest(file_path)?; in get_or_compute_digest()
269 Ok((digest, cache_key)) in get_or_compute_digest()
325 new_cache.insert(meta.cache_key.clone(), meta.digest.clone()); in write_to_file()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v1/
DV1SchemeVerifier.java764 .digest(signatureFile); in verifySignerInfoAgainstSigFile()
966 byte[] actual = digest(jcaDigestAlgorithm, manifestBytes); in verifyManifestDigest()
967 byte[] expected = expectedDigest.digest; in verifyManifestDigest()
1005 digest( in verifyManifestMainSectionDigest()
1010 byte[] expected = expectedDigest.digest; in verifyManifestMainSectionDigest()
1057 digest( in verifyManifestIndividualSectionDigest()
1062 byte[] expected = expectedDigest.digest; in verifyManifestIndividualSectionDigest()
1193 byte[] digest = base64Decoder.decode(digestBase64); in getDigestsToVerify()
1195 if ((digestInResult == null) || (!Arrays.equals(digestInResult, digest))) { in getDigestsToVerify()
1196 result.add(new NamedDigest(alg, digest)); in getDigestsToVerify()
[all …]
DV1SchemeSigner.java467 Base64.getEncoder().encodeToString(md.digest(manifest.contents))); in generateSignatureFile()
479 byte[] sectionDigest = md.digest(sectionContents); in generateSignatureFile()
/tools/tradefederation/core/common_util/com/android/tradefed/cache/
DDigestCalculator.java49 byte[] digest = in compute()
56 Preconditions.checkNotNull(digest, "Missing digest for %s", file.getAbsolutePath()); in compute()
57 return DigestCalculator.buildDigest(digest, Files.size(file.toPath())); in compute()
/tools/tradefederation/core/javatests/com/android/tradefed/cache/remote/
DByteStreamDownloaderTest.java76 Digest digest = DigestCalculator.compute(blob.getBytes(UTF_8)); in downloadBlob_works() local
78 String.format("%s/blobs/%s/%d", INSTANCE, digest.getHash(), digest.getSizeBytes()); in downloadBlob_works()
102 ListenableFuture<Void> downloaded = downloader.downloadBlob(digest, out); in downloadBlob_works()
DRemoteCacheClientTest.java79 public ListenableFuture<Void> downloadBlob(Digest digest, OutputStream out) { in downloadBlob() argument
81 if (digest.getSizeBytes() == 0) { in downloadBlob()
85 if (!mData.containsKey(digest)) { in downloadBlob()
89 InputStream data = new ByteArrayInputStream(mData.get(digest).getBytes(UTF_8)); in downloadBlob()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/stamp/
DV1SourceStampSigner.java65 for (Map.Entry<ContentDigestAlgorithm, byte[]> digest : digestInfo.entrySet()) { in generateSourceStampBlock()
66 digests.add(Pair.of(digest.getKey().getId(), digest.getValue())); in generateSourceStampBlock()
DV2SourceStampSigner.java163 for (Map.Entry<ContentDigestAlgorithm, byte[]> digest : digestInfo.entrySet()) { in getSignedDigestsFor()
164 digests.add(Pair.of(digest.getKey().getId(), digest.getValue())); in getSignedDigestsFor()
/tools/tradefederation/core/tools/
Dcontent_uploader.py74 digest: str
297 digest = digest_file.read()
298 if digest:
299 logging.info('Uploaded %s to CAS. Digest: %s', artifact.source_path, digest)
312 return UploadResult(digest, content_details)
370 if result and result.digest:
371 file_digests[name] = result.digest
/tools/tradefederation/core/src/com/android/tradefed/build/content/
DArtifactDetails.java41 public String digest; field in ArtifactDetails.ArtifactFileDescriptor
104 if (!be.digest.equals(pe.digest)) { in diffContents()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/
DV4SchemeSigner.java265 byte[] digest = getBestV3Digest(apk, zipSections, VERSION_APK_SIGNATURE_SCHEME_V31); in getApkDigests()
266 sigSchemeToDigest.put(VERSION_APK_SIGNATURE_SCHEME_V31, digest); in getApkDigests()
274 byte[] digest = getBestV3Digest(apk, zipSections, VERSION_APK_SIGNATURE_SCHEME_V3); in getApkDigests()
275 sigSchemeToDigest.put(VERSION_APK_SIGNATURE_SCHEME_V3, digest); in getApkDigests()
282 byte[] digest = getBestV2Digest(apk, zipSections); in getApkDigests()
283 sigSchemeToDigest.put(VERSION_APK_SIGNATURE_SCHEME_V2, digest); in getApkDigests()
/tools/asuite/adevice/tests/
Dwhole_program_tests.rs199 pub fn file_metadata(digest: &str) -> FileMetadata { in file_metadata()
202 digest: digest.to_string(), in file_metadata()
/tools/tradefederation/core/javatests/com/android/tradefed/cache/
DMerkleTreeTest.java103 private static FileNode newFileNode(String name, Digest digest, boolean isExecutable) { in newFileNode() argument
106 .setDigest(digest) in newFileNode()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/
DV2SchemeVerifier.java396 ByteBuffer digest = ApkSigningBlockUtils.getLengthPrefixedSlice(digests); in parseSigner() local
397 int sigAlgorithmId = digest.getInt(); in parseSigner()
398 byte[] digestBytes = ApkSigningBlockUtils.readLengthPrefixedByteArray(digest); in parseSigner()
413 for (ApkSigningBlockUtils.Result.SignerInfo.ContentDigest digest : result.contentDigests) { in parseSigner()
414 sigAlgsFromDigestsRecord.add(digest.getSignatureAlgorithmId()); in parseSigner()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v3/
DV3SchemeVerifier.java515 ByteBuffer digest = getLengthPrefixedSlice(digests); in parseSigner() local
516 int sigAlgorithmId = digest.getInt(); in parseSigner()
517 byte[] digestBytes = readLengthPrefixedByteArray(digest); in parseSigner()
532 for (ApkSigningBlockUtils.Result.SignerInfo.ContentDigest digest : result.contentDigests) { in parseSigner()
533 sigAlgsFromDigestsRecord.add(digest.getSignatureAlgorithmId()); in parseSigner()
/tools/apksig/src/main/java/com/android/apksig/apk/
DApkUtilsLite.java197 return messageDigest.digest(); in computeSha256DigestBytes()
/tools/apksig/src/apksigner/java/com/android/apksigner/
DApkSignerTool.java1170 sha256.digest(encodedCert))); in printCertificate()
1172 sha1.digest(encodedCert))); in printCertificate()
1174 name + " certificate MD5 digest: " + HexEncoding.encode(md5.digest(encodedCert))); in printCertificate()
1197 sha256.digest(encodedKey))); in printCertificate()
1199 sha1.digest(encodedKey))); in printCertificate()
1201 name + " public key MD5 digest: " + HexEncoding.encode(md5.digest(encodedKey))); in printCertificate()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java365 md.digest( in computeOneMbChunkContentDigests()
385 byte[] digest = md.digest(concatenationOfChunkCountAndChunkDigests); in computeOneMbChunkContentDigests()
386 outputContentDigests.put(digestAlgorithm, digest); in computeOneMbChunkContentDigests()
419 messageDigest.digest(chunkDigests.concatOfDigestsOfChunks)); in computeOneMbChunkContentDigests()
495 int actualDigestSize = messageDigests.get(i).digest( in run()
/tools/apksig/src/test/java/com/android/apksig/apk/
DApkUtilsTest.java140 byte[] actualDigest = md.digest(); in testGetAndroidManifest()
/tools/tradefederation/core/javatests/com/android/tradefed/util/
DRunUtilTest.java151 Digest digest = DigestCalculator.compute(action.action()); in lookupCache() local
152 if (mCache.containsKey(digest)) { in lookupCache()
153 return mCache.get(digest); in lookupCache()
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DX509CertificateUtilsTest.java189 return HexEncoding.encode(MessageDigest.getInstance("SHA-256").digest(bytes)); in getHexEncodedDigestOfBytes()
/tools/apksig/src/main/java/com/android/apksig/
DSourceStampVerifier.java429 ByteBuffer digest = ApkSigningBlockUtilsLite.getLengthPrefixedSlice(digests); in parseSigner() local
430 int sigAlgorithmId = digest.getInt(); in parseSigner()
431 byte[] digestBytes = ApkSigningBlockUtilsLite.readLengthPrefixedByteArray(digest); in parseSigner()
/tools/tradefederation/core/res/perfetto/
Drecord_android_trace224 digest = f.read().decode()
225 if digest == sha256:
/tools/security/remote_provisioning/attestation_testing/java/com/google/attestationexample/
DAuthorizationList.java310 public static String digestToString(int digest) { in digestToString() argument
311 return forMap(digestMap, "Unknown").apply(digest); in digestToString()

12