/frameworks/base/apex/blobstore/framework/java/android/app/blob/ |
D | BlobHandle.java | 69 @NonNull public final byte[] digest; field in BlobHandle 92 private BlobHandle(String algorithm, byte[] digest, CharSequence label, long expiryTimeMillis, in BlobHandle() argument 95 this.digest = digest; in BlobHandle() 103 this.digest = in.createByteArray(); in BlobHandle() 110 public static @NonNull BlobHandle create(@NonNull String algorithm, @NonNull byte[] digest, in create() argument 113 final BlobHandle handle = new BlobHandle(algorithm, digest, label, expiryTimeMillis, tag); in create() 144 public static @NonNull BlobHandle createWithSha256(@NonNull byte[] digest, in createWithSha256() argument 147 return create(ALGO_SHA_256, digest, label, expiryTimeMillis, tag); in createWithSha256() 156 return digest; in getSha256Digest() 195 dest.writeByteArray(digest); in writeToParcel() [all …]
|
/frameworks/base/core/java/android/security/net/config/ |
D | Pin.java | 26 public final byte[] digest; field in Pin 30 public Pin(String digestAlgorithm, byte[] digest) { in Pin() argument 32 this.digest = digest; in Pin() 33 mHashCode = Arrays.hashCode(digest) ^ digestAlgorithm.hashCode(); in Pin() 72 if (!Arrays.equals(digest, other.digest)) { in equals()
|
D | DirectoryCertificateSource.java | 215 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/identity/java/android/security/identity/ |
D | Util.java | 125 byte[] digest = new byte[0]; in computeHkdf() 127 mac.update(digest); in computeHkdf() 130 digest = mac.doFinal(); in computeHkdf() 131 if (pos + digest.length < size) { in computeHkdf() 132 System.arraycopy(digest, 0, result, pos, digest.length); in computeHkdf() 133 pos += digest.length; in computeHkdf() 136 System.arraycopy(digest, 0, result, pos, size - pos); in computeHkdf()
|
/frameworks/base/core/java/android/content/pm/ |
D | InstantAppResolveInfo.java | 86 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 …]
|
/frameworks/base/services/core/java/com/android/server/net/watchlist/ |
D | HarmfulDigests.java | 45 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()
|
D | WatchlistLoggingHandler.java | 236 final byte[] digest = getDigestFromUid(uid); in insertRecord() 237 if (digest == null) { in insertRecord() 240 if (mDbHelper.insertNewRecord(digest, cncHost, timestamp)) { in insertRecord() 309 byte[] digest = getDigestFromUid(apps.get(i).uid); in getAllDigestsForReport() 310 if (digest != null) { in getAllDigestsForReport() 311 result.add(HexDump.toHexString(digest)); in getAllDigestsForReport()
|
/frameworks/base/core/jni/ |
D | com_android_internal_security_VerityUtils.cpp | 90 int measureFsverity(JNIEnv *env, jobject /* clazz */, jstring filePath, jbyteArray digest) { in measureFsverity() argument 111 if (digest != nullptr && data->digest_size > 0) { in measureFsverity() 112 auto digestSize = env->GetArrayLength(digest); in measureFsverity() 116 env->SetByteArrayRegion(digest, 0, data->digest_size, (const jbyte *)data->digest); in measureFsverity()
|
/frameworks/base/core/tests/privacytests/src/android/privacy/ |
D | RapporEncoderTest.java | 202 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()
|
D | LongitudinalReportingEncoderTest.java | 413 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/ |
D | ObexSession.java | 169 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/am/ |
D | ActivityManagerUtils.java | 88 final MessageDigest digest = MessageDigest.getInstance("SHA-1"); in getUnsignedHashUnCached() local 89 digest.update(s.getBytes()); in getUnsignedHashUnCached() 90 return unsignedIntFromBytes(digest.digest()); in getUnsignedHashUnCached()
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | KeyProperties.java | 635 public static int toKeymaster(@NonNull @DigestEnum String digest) { in toKeymaster() argument 636 switch (digest.toUpperCase(Locale.US)) { in toKeymaster() 652 throw new IllegalArgumentException("Unsupported digest algorithm: " + digest); in toKeymaster() 657 public static @DigestEnum String fromKeymaster(int digest) { in fromKeymaster() argument 658 switch (digest) { in fromKeymaster() 674 throw new IllegalArgumentException("Unsupported digest algorithm: " + digest); in fromKeymaster() 679 public static @DigestEnum String fromKeymasterToSignatureAlgorithmDigest(int digest) { in fromKeymasterToSignatureAlgorithmDigest() argument 680 switch (digest) { in fromKeymasterToSignatureAlgorithmDigest() 696 throw new IllegalArgumentException("Unsupported digest algorithm: " + digest); in fromKeymasterToSignatureAlgorithmDigest() 707 for (int digest : digests) { in allFromKeymaster() [all …]
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/kv/ |
D | DecryptedChunkKvOutput.java | 81 MessageDigest digest = getMessageDigest(); in getDigest() local 84 digest.update(hash.getHash()); in getDigest() 86 return digest.digest(); in getDigest()
|
/frameworks/base/services/core/java/com/android/server/backup/ |
D | BackupUtils.java | 106 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/ |
D | StrictJarVerifier.java | 104 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/ |
D | DownloadRequest.java | 364 MessageDigest digest; in getHash() local 366 digest = MessageDigest.getInstance("SHA-256"); in getHash() 372 digest.update(sourceUri.toString().getBytes(StandardCharsets.UTF_8)); in getHash() 373 digest.update(destinationUri.toString().getBytes(StandardCharsets.UTF_8)); in getHash() 375 digest.update(serializedResultIntentForApp.getBytes(StandardCharsets.UTF_8)); in getHash() 379 return Base64.encodeToString(digest.digest(), Base64.URL_SAFE | Base64.NO_WRAP); in getHash()
|
/frameworks/base/tests/BlobStoreTestUtils/src/com/android/utils/blob/ |
D | FakeBlobData.java | 128 mFileDigest = FileUtils.digest(mFile, "SHA-256"); in prepare() 222 actualDigest = FileUtils.digest(in, "SHA-256"); in verifyBlob() 229 final MessageDigest digest = MessageDigest.getInstance("SHA-256"); in createSha256Digest() local 237 digest.update(buffer, 0, toRead); in createSha256Digest() 240 return digest.digest(); in createSha256Digest()
|
/frameworks/base/core/java/android/privacy/internal/rappor/ |
D | RapporEncoder.java | 84 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/ |
D | AccountManagerBackupHelper.java | 188 final String digest = PackageUtils.computeSignaturesSha256Digest( in backupAccountAccessPermissions() local 190 if (digest != null) { in backupAccountAccessPermissions() 195 serializer.attribute(null, ATTR_DIGEST, digest); in backupAccountAccessPermissions() 237 String digest = parser.getAttributeValue(null, ATTR_DIGEST); in restoreAccountAccessPermissions() local 238 if (TextUtils.isEmpty(digest)) { in restoreAccountAccessPermissions() 243 accountDigest, packageName, digest, userId); in restoreAccountAccessPermissions()
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/kv/ |
D | DecryptedChunkKvOutputTest.java | 101 MessageDigest digest = MessageDigest.getInstance(DecryptedChunkKvOutput.DIGEST_ALGORITHM); in getDigest_returnsDigestOfSortedHashes() local 105 .forEachOrdered(hash -> digest.update(hash.getHash())); in getDigest_returnsDigestOfSortedHashes() 106 assertThat(actualDigest).isEqualTo(digest.digest()); in getDigest_returnsDigestOfSortedHashes()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/ |
D | BackupEncrypter.java | 66 public Result(List<ChunkHash> allChunks, List<EncryptedChunk> newChunks, byte[] digest) { in Result() argument 68 mDigest = digest; in Result()
|
/frameworks/base/services/core/java/com/android/server/locksettings/ |
D | SyntheticPasswordCrypto.java | 226 MessageDigest digest = MessageDigest.getInstance("SHA-512"); in personalisedHash() local 233 digest.update(personalisation); in personalisedHash() 235 digest.update(data); in personalisedHash() 237 return digest.digest(); in personalisedHash()
|
/frameworks/base/core/java/android/os/ |
D | SystemProperties.java | 313 final MessageDigest digest = MessageDigest.getInstance("SHA-1"); in digestOf() local 316 digest.update(item.getBytes(StandardCharsets.UTF_8)); in digestOf() 318 return HexEncoding.encodeToString(digest.digest()).toLowerCase(); in digestOf()
|
/frameworks/base/apex/blobstore/service/java/com/android/server/blob/ |
D | BlobStoreManagerShellCommand.java | 153 args.digest = Base64.getDecoder().decode(getNextArgRequired()); in parseOptions() 182 public byte[] digest; field in BlobStoreManagerShellCommand.ParsedArgs 189 return BlobHandle.create(algorithm, digest, label, expiryTimeMillis, tag); in getBlobHandle()
|