/cts/hostsidetests/edi/src/android/edi/cts/ |
D | SecurityPolicyDeviceInfo.java | 42 byte[] digest = md.digest(); in collectDeviceInfo() 43 store.addResult("sysfs_sepolicy_hash_sha256", HexFormat.of().formatHex(digest)); in collectDeviceInfo()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/mainline/ |
D | ModuleDetector.java | 90 final byte[] digest = messageDigest.digest(); in getSignatureDigest() 91 final int digestLength = digest.length; in getSignatureDigest() 96 final int byteHex = digest[i] & 0xFF; in getSignatureDigest()
|
/cts/tests/tests/keystore/src/android/keystore/cts/util/ |
D | TestUtils.java | 809 MessageDigest digest = MessageDigest.getInstance("SHA-512"); in generateLargeKatMsg() local 813 seed = digest.digest(seed); in generateLargeKatMsg() 975 String digest = algorithmUpperCase.substring(0, withIndex); in getSignatureAlgorithmDigest() local 976 if (digest.startsWith("SHA")) { in getSignatureAlgorithmDigest() 977 digest = "SHA-" + digest.substring("SHA".length()); in getSignatureAlgorithmDigest() 979 return digest; in getSignatureAlgorithmDigest() 1013 String digest = getSignatureAlgorithmDigest(algorithm); in isKeyLongEnoughForSignatureAlgorithm() local 1014 int digestOutputSizeBits = getDigestOutputSizeBits(digest); in isKeyLongEnoughForSignatureAlgorithm() 1052 String digest = getCipherDigest(transformation); in getMaxSupportedPlaintextInputSizeBytes() local 1053 int digestOutputSizeBytes = (getDigestOutputSizeBits(digest) + 7) / 8; in getMaxSupportedPlaintextInputSizeBytes() [all …]
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | EnrollmentSpecificIdTest.java | 221 byte[] digest = new byte[0]; in computeHkdf() 223 mac.update(digest); in computeHkdf() 226 digest = mac.doFinal(); in computeHkdf() 227 if (pos + digest.length < size) { in computeHkdf() 228 System.arraycopy(digest, 0, result, pos, digest.length); in computeHkdf() 229 pos += digest.length; in computeHkdf() 232 System.arraycopy(digest, 0, result, pos, size - pos); in computeHkdf()
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | LocaleDeviceInfo.java | 175 byte[] digest = md.digest(); in sha256() 176 StringBuilder sb = new StringBuilder(digest.length * 2); in sha256() 177 for(int i = 0; i < digest.length; i++){ in sha256() 178 sb.append(Character.forDigit((digest[i] >> 4) & 0xF, 16)); in sha256() 179 sb.append(Character.forDigit((digest[i] & 0xF), 16)); in sha256()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | PackageUtil.java | 136 final byte[] digest = messageDigest.digest(); in computePackageSignatureDigest() 137 final int digestLength = digest.length; in computePackageSignatureDigest() 142 final int byteHex = digest[i] & 0xFF; in computePackageSignatureDigest() 189 BigInteger bigInt = new BigInteger(1, md.digest()); in computeFileHash()
|
/cts/hostsidetests/appsecurity/res/pkgsigverify/ |
D | generate-apks.sh | 8 …dsa-3072.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withDSA.a… 9 …/ec-p256.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withEC.ap… 10 …rsa-2048.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withRSA.a… 11 …/ec-p384.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha512withEC.ap… 12 …rsa-4096.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha512withRSA.a… 15 …dsa-3072.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withDSA-V… 16 …/ec-p256.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withEC-Ve… 17 …rsa-2048.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withRSA-V… 20 …dsa-3072.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v3-Sha256withDSA.a… 21 …/ec-p256.x509.pem -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v3-Sha256withEC.ap… [all …]
|
/cts/tools/utils/ |
D | certificates.py | 52 def create(cn, issuer=None, key=None, keysize=2048, digest="sha256", argument 75 cert.sign(signing_key, digest) 82 a_sha1 = Certificate.create("Root A", key=a.key, digest="sha1")
|
/cts/tests/tests/keystore/src/android/keystore/cts/performance/ |
D | RsaCipherPerformanceTest.java | 90 String digest = TestUtils.getCipherDigest(algorithm); in AndroidKeystoreRsaKeyGenerator() local 102 (digest != null) in AndroidKeystoreRsaKeyGenerator() 103 ? new String[] {digest} in AndroidKeystoreRsaKeyGenerator()
|
/cts/tests/tests/media/common/jni/ |
D | md5_utils.h | 42 void MD5Final(unsigned char digest[16], struct MD5Context *context);
|
D | md5_utils.cpp | 108 MD5Final(md5byte digest[16], struct MD5Context *ctx) { in MD5Final() 135 memcpy(digest, ctx->buf, 16); in MD5Final()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | RSASignatureTest.java | 130 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testSmallKeyRejected() local 131 if (KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) { in testSmallKeyRejected() 136 int digestOutputSizeBits = TestUtils.getDigestOutputSizeBits(digest); in testSmallKeyRejected()
|
D | KeyGeneratorTest.java | 459 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local 460 assertNotNull(digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 475 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local 479 .setDigests(digest) in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 484 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local 496 String anotherDigest = "SHA-256".equalsIgnoreCase(digest) ? "SHA-384" : "SHA-256"; in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 506 .setDigests(digest, anotherDigest) in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 653 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testInitWithKeyAlgorithmDigestMissingFromAuthorizedDigestFailsHelper() local 654 String anotherDigest = KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest) in testInitWithKeyAlgorithmDigestMissingFromAuthorizedDigestFailsHelper()
|
D | SecretKeyFactoryTest.java | 114 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testGetKeySpecWithKeystoreKeyAndKeyInfoReflectsAllAuthorizations() local 115 digests = new String[] {digest}; in testGetKeySpecWithKeystoreKeyAndKeyInfoReflectsAllAuthorizations()
|
D | SignatureTest.java | 765 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testLongMsgKat() local 767 if ((KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) in testLongMsgKat() 924 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testInitSignFailsWhenDigestNotAuthorized() local 926 (KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest)) in testInitSignFailsWhenDigestNotAuthorized() 932 if (!KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) { in testInitSignFailsWhenDigestNotAuthorized() 951 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testInitVerifyIgnoresThatDigestNotAuthorized() local 953 (KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest)) in testInitVerifyIgnoresThatDigestNotAuthorized()
|
D | ImportWrappedKeyTest.java | 603 DERTaggedObject digest = in makeRsaAuthList() local 625 allItems.add(digest); in makeRsaAuthList() 652 DERTaggedObject digest = in makeEcAuthList() local 663 allItems.add(digest); in makeEcAuthList()
|
/cts/tests/appsearch/testutils/src/android/app/appsearch/testutil/ |
D | PackageUtil.java | 46 return md.digest(); in getSelfPackageSha256Cert()
|
/cts/hostsidetests/appsecurity/test-apps/KeyRotationTest/src/android/appsecurity/cts/keyrotationtest/utils/ |
D | SignatureUtils.java | 44 return Optional.of(toHexString(messageDigest.digest())); in computeSha256Digest()
|
/cts/tests/mediaprovider/src/android/provider/cts/media/ |
D | MediaProviderTestUtils.java | 255 return digestIn.getMessageDigest().digest(); in hash() 387 MessageDigest digest = MessageDigest.getInstance("SHA-1"); in getRawFileHash() local 392 digest.update(buf, 0, n); in getRawFileHash() 396 byte[] hash = digest.digest(); in getRawFileHash()
|
/cts/hostsidetests/blobstore/test-apps/BlobStoreHostTestHelper/src/com/android/cts/device/blob/ |
D | DataPersistenceTest.java | 123 final byte[] digest = Base64.getDecoder().decode(sharedPref.getString(KEY_DIGEST, null)); in readBlobHandleFromDisk() 127 return BlobHandle.createWithSha256(digest, label, expiryMillis, tag); in readBlobHandleFromDisk()
|
D | DataCleanupTest.java | 172 final byte[] digest = Base64.getDecoder().decode(args.getString(KEY_DIGEST)); in getBlobHandleFromArgs() 176 return BlobHandle.createWithSha256(digest, label, expiryTimeMillis, tag); in getBlobHandleFromArgs()
|
/cts/tests/tests/wifi/src/android/net/wifi/passpoint/cts/ |
D | PasspointConfigurationTest.java | 246 MessageDigest.getInstance("SHA-256").digest(FakeKeys.CLIENT_CERT.getEncoded())); in createCredentialWithCertificateCredential() 249 .digest(FakeKeys.CLIENT_SUITE_B_RSA3072_CERT.getEncoded())); in createCredentialWithCertificateCredential()
|
/cts/tools/cts-api-coverage/src/com/android/cts/apicoverage/ |
D | TestSuiteContentReport.java | 277 byte[] mdbytes = md.digest(); in getFileContentId() 294 byte[] mdbytes = md.digest(); in getFolderContentId() 308 byte[] mdbytes = md.digest(); in getId()
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | InstallConstraintsTest.kt | 483 digest() in <lambda>() 506 val digest = computeSha256DigestBytes(signatures[0].toByteArray()) in <lambda>() constant 507 return encodeHex(digest) in <lambda>()
|
/cts/tools/release-parser/src/com/android/cts/releaseparser/ |
D | FileParser.java | 140 mContentId = Base64.getEncoder().encodeToString(md.digest()); in getFileContentId()
|