Home
last modified time | relevance | path

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

1234

/frameworks/base/core/java/android/security/net/config/
DPin.java24 public final byte[] digest; field in Pin
28 public Pin(String digestAlgorithm, byte[] digest) { in Pin() argument
30 this.digest = digest; in Pin()
31 mHashCode = Arrays.hashCode(digest) ^ digestAlgorithm.hashCode(); in Pin()
70 if (!Arrays.equals(digest, other.digest)) { in equals()
DDirectoryCertificateSource.java215 byte[] digest = MessageDigest.getInstance("MD5").digest(principal.getEncoded());
217 return (((digest[offset++] & 0xff) << 0) | ((digest[offset++] & 0xff) << 8)
218 | ((digest[offset++] & 0xff) << 16) | ((digest[offset] & 0xff) << 24));
/frameworks/base/core/java/android/content/pm/
DInstantAppResolveInfo.java86 public InstantAppResolveInfo(@NonNull InstantAppDigest digest, @Nullable String packageName, in InstantAppResolveInfo() argument
88 this(digest, packageName, filters, (long) versionCode, null /* extras */); in InstantAppResolveInfo()
92 public InstantAppResolveInfo(@NonNull InstantAppDigest digest, @Nullable String packageName, in InstantAppResolveInfo() argument
95 this(digest, packageName, filters, versionCode, extras, false); in InstantAppResolveInfo()
113 private InstantAppResolveInfo(@NonNull InstantAppDigest digest, @Nullable String packageName, in InstantAppResolveInfo() argument
121 mDigest = digest; in InstantAppResolveInfo()
289 final MessageDigest digest = MessageDigest.getInstance(SHA_ALGORITHM); in generateDigest() local
292 digests.add(digest.digest(hostBytes)); in generateDigest()
298 digests.add(digest.digest(hostName.getBytes())); in generateDigest()
302 digests.add(digest.digest(hostBytes)); in generateDigest()
[all …]
DInstantAppRequest.java46 public final InstantAppResolveInfo.InstantAppDigest digest; field in InstantAppRequest
59 digest = new InstantAppResolveInfo.InstantAppDigest( in InstantAppRequest()
62 digest = InstantAppResolveInfo.InstantAppDigest.UNDEFINED; in InstantAppRequest()
/frameworks/base/identity/java/android/security/identity/
DUtil.java119 byte[] digest = new byte[0]; in computeHkdf()
121 mac.update(digest); in computeHkdf()
124 digest = mac.doFinal(); in computeHkdf()
125 if (pos + digest.length < size) { in computeHkdf()
126 System.arraycopy(digest, 0, result, pos, digest.length); in computeHkdf()
127 pos += digest.length; in computeHkdf()
130 System.arraycopy(digest, 0, result, pos, size - pos); in computeHkdf()
/frameworks/base/services/core/java/com/android/server/net/watchlist/
DHarmfulDigests.java45 public boolean contains(byte[] digest) { in contains() argument
46 return mDigestSet.contains(HexDump.toHexString(digest)); in contains()
50 for (String digest : mDigestSet) { in dump()
51 pw.println(digest); in dump()
DWatchlistLoggingHandler.java234 final byte[] digest = getDigestFromUid(uid); in insertRecord()
235 if (digest == null) { in insertRecord()
239 final boolean result = mDbHelper.insertNewRecord(digest, cncHost, timestamp); in insertRecord()
307 byte[] digest = getDigestFromUid(apps.get(i).uid); in getAllDigestsForReport()
308 if (digest != null) { in getAllDigestsForReport()
309 result.add(HexDump.toHexString(digest)); in getAllDigestsForReport()
DDigestUtils.java52 return digester.digest(); in getSha256Hash()
/frameworks/base/keystore/java/android/security/keystore/
DKeyProperties.java574 public static int toKeymaster(@NonNull @DigestEnum String digest) { in toKeymaster() argument
575 switch (digest.toUpperCase(Locale.US)) { in toKeymaster()
591 throw new IllegalArgumentException("Unsupported digest algorithm: " + digest); in toKeymaster()
596 public static @DigestEnum String fromKeymaster(int digest) { in fromKeymaster() argument
597 switch (digest) { in fromKeymaster()
613 throw new IllegalArgumentException("Unsupported digest algorithm: " + digest); in fromKeymaster()
618 public static @DigestEnum String fromKeymasterToSignatureAlgorithmDigest(int digest) { in fromKeymasterToSignatureAlgorithmDigest() argument
619 switch (digest) { in fromKeymasterToSignatureAlgorithmDigest()
635 throw new IllegalArgumentException("Unsupported digest algorithm: " + digest); in fromKeymasterToSignatureAlgorithmDigest()
646 for (int digest : digests) { in allFromKeymaster()
[all …]
DAndroidKeyStoreSpi.java811 String digest = spec.getDigests()[0]; in setWrappedKeyEntry() local
812 if (KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
814 } else if (KeyProperties.DIGEST_MD5.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
816 } else if (KeyProperties.DIGEST_SHA1.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
818 } else if (KeyProperties.DIGEST_SHA224.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
820 } else if (KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
822 } else if (KeyProperties.DIGEST_SHA384.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
824 } else if (KeyProperties.DIGEST_SHA512.equalsIgnoreCase(digest)) { in setWrappedKeyEntry()
/frameworks/base/core/tests/privacytests/src/android/privacy/
DRapporEncoderTest.java202 byte[] digest = md5.digest(testingSecret.getBytes(StandardCharsets.UTF_8)); in makeTestingUserSecret()
203 assertEquals(16, digest.length); in makeTestingUserSecret()
204 return ByteBuffer.allocate(48).put(digest).put(digest).put(digest).array(); in makeTestingUserSecret()
DLongitudinalReportingEncoderTest.java413 byte[] digest = md5.digest(testingSecret.getBytes(StandardCharsets.UTF_8)); in makeTestingUserSecret()
414 assertEquals(16, digest.length); in makeTestingUserSecret()
415 return ByteBuffer.allocate(48).put(digest).put(digest).put(digest).array(); in makeTestingUserSecret()
/frameworks/base/obex/javax/obex/
DObexSession.java169 byte[] digest = new byte[challenge.length + password.length + 1]; in handleAuthChall()
170 System.arraycopy(challenge, 0, digest, 0, challenge.length); in handleAuthChall()
172 digest[challenge.length] = (byte)0x3A; in handleAuthChall()
173 System.arraycopy(password, 0, digest, challenge.length + 1, password.length); in handleAuthChall()
179 System.arraycopy(ObexHelper.computeMd5Hash(digest), 0, header.mAuthResp, 2, 16); in handleAuthChall()
/frameworks/base/services/core/java/com/android/server/backup/
DBackupUtils.java106 MessageDigest digest = MessageDigest.getInstance("SHA-256"); in hashSignature() local
107 digest.update(signature); in hashSignature()
108 return digest.digest(); in hashSignature()
/frameworks/base/core/java/android/util/jar/
DStrictJarVerifier.java104 private final MessageDigest digest; field in StrictJarVerifier.VerifierEntry
112 VerifierEntry(String name, MessageDigest digest, byte[] hash, in VerifierEntry() argument
115 this.digest = digest; in VerifierEntry()
126 digest.update((byte) value); in write()
134 digest.update(buf, off, nbytes); in write()
149 byte[] d = digest.digest(); in verify()
511 byte[] b = md.digest(); in verify()
/frameworks/base/telephony/java/android/telephony/mbms/
DDownloadRequest.java366 MessageDigest digest; in getHash() local
368 digest = MessageDigest.getInstance("SHA-256"); in getHash()
374 digest.update(sourceUri.toString().getBytes(StandardCharsets.UTF_8)); in getHash()
375 digest.update(destinationUri.toString().getBytes(StandardCharsets.UTF_8)); in getHash()
377 digest.update(serializedResultIntentForApp.getBytes(StandardCharsets.UTF_8)); in getHash()
381 return Base64.encodeToString(digest.digest(), Base64.URL_SAFE | Base64.NO_WRAP); in getHash()
/frameworks/base/core/java/android/privacy/internal/rappor/
DRapporEncoder.java84 MessageDigest digest = MessageDigest.getInstance("SHA-256"); in getInsecureSeed() local
85 byte[] bytes = digest.digest(input.getBytes(StandardCharsets.UTF_8)); in getInsecureSeed()
/frameworks/base/services/core/java/com/android/server/accounts/
DAccountManagerBackupHelper.java192 final String digest = PackageUtils.computeSignaturesSha256Digest( in backupAccountAccessPermissions() local
194 if (digest != null) { in backupAccountAccessPermissions()
199 serializer.attribute(null, ATTR_DIGEST, digest); in backupAccountAccessPermissions()
241 String digest = parser.getAttributeValue(null, ATTR_DIGEST); in restoreAccountAccessPermissions() local
242 if (TextUtils.isEmpty(digest)) { in restoreAccountAccessPermissions()
247 accountDigest, packageName, digest, userId); in restoreAccountAccessPermissions()
/frameworks/base/services/core/java/com/android/server/locksettings/
DSyntheticPasswordCrypto.java203 MessageDigest digest = MessageDigest.getInstance("SHA-512"); in personalisedHash() local
210 digest.update(personalisation); in personalisedHash()
212 digest.update(data); in personalisedHash()
214 return digest.digest(); in personalisedHash()
/frameworks/base/core/java/android/os/
DSystemProperties.java303 final MessageDigest digest = MessageDigest.getInstance("SHA-1"); in digestOf() local
306 digest.update(item.getBytes(StandardCharsets.UTF_8)); in digestOf()
308 return HexEncoding.encodeToString(digest.digest()).toLowerCase(); in digestOf()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DServiceProviderVerifier.java208 MessageDigest digest = MessageDigest.getInstance("SHA-256"); in computeHash() local
209 return digest.digest(input); in computeHash()
/frameworks/base/services/core/java/com/android/server/
DPersistentDataBlockService.java276 byte[] digest = computeDigestLocked(storedDigest); in enforceChecksumValidity()
277 if (digest == null || !Arrays.equals(storedDigest, digest)) { in enforceChecksumValidity()
288 byte[] digest = computeDigestLocked(null); in computeAndWriteDigestLocked()
289 if (digest != null) { in computeAndWriteDigestLocked()
300 outputStream.write(digest, 0, DIGEST_SIZE_BYTES); in computeAndWriteDigestLocked()
353 return md.digest(); in computeDigestLocked()
/frameworks/base/services/core/java/com/android/server/pm/
DInstantAppResolver.java135 requestObj.digest.getDigestPrefixSecure(), requestObj.userId, token); in doInstantAppResolutionPhaseOne()
139 requestObj.userId, origIntent.getPackage(), requestObj.digest, token); in doInstantAppResolutionPhaseOne()
194 0 /*userId*/, origIntent.getPackage(), requestObj.digest, in doInstantAppResolutionPhaseTwo()
227 requestObj.digest.getDigestPrefixSecure(), requestObj.userId, token, callback, in doInstantAppResolutionPhaseTwo()
362 InstantAppDigest digest, String token) { in filterInstantAppIntent() argument
363 final int[] shaPrefix = digest.getDigestPrefix(); in filterInstantAppIntent()
364 final byte[][] digestBytes = digest.getDigestBytes(); in filterInstantAppIntent()
/frameworks/base/services/tests/servicestests/src/com/android/server/net/watchlist/
DReportEncoderTests.java91 final String digest = appProto.appDigest; in testReportUtils_serializeReport() local
92 assertEquals(map.get(digest), appProto.encodedResult); in testReportUtils_serializeReport()
/frameworks/base/core/java/android/util/apk/
DApkSignatureSchemeV2Verifier.java305 ByteBuffer digest = getLengthPrefixedSlice(digests); in verifySigner() local
306 if (digest.remaining() < 8) { in verifySigner()
309 int sigAlgorithm = digest.getInt(); in verifySigner()
312 contentDigest = readLengthPrefixedByteArray(digest); in verifySigner()

1234