/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | LocaleDeviceInfo.java | 112 byte[] digest = md.digest(); in sha256() 113 StringBuilder sb = new StringBuilder(digest.length * 2); in sha256() 114 for(int i = 0; i < digest.length; i++){ in sha256() 115 sb.append(Character.forDigit((digest[i] >> 4) & 0xF, 16)); in sha256() 116 sb.append(Character.forDigit((digest[i] & 0xF), 16)); in sha256()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | TestUtils.java | 596 MessageDigest digest = MessageDigest.getInstance("SHA-512"); in generateLargeKatMsg() local 600 seed = digest.digest(seed); in generateLargeKatMsg() 762 String digest = algorithmUpperCase.substring(0, withIndex); in getSignatureAlgorithmDigest() local 763 if (digest.startsWith("SHA")) { in getSignatureAlgorithmDigest() 764 digest = "SHA-" + digest.substring("SHA".length()); in getSignatureAlgorithmDigest() 766 return digest; in getSignatureAlgorithmDigest() 800 String digest = getSignatureAlgorithmDigest(algorithm); in isKeyLongEnoughForSignatureAlgorithm() local 801 int digestOutputSizeBits = getDigestOutputSizeBits(digest); in isKeyLongEnoughForSignatureAlgorithm() 839 String digest = getCipherDigest(transformation); in getMaxSupportedPlaintextInputSizeBytes() local 840 int digestOutputSizeBytes = (getDigestOutputSizeBits(digest) + 7) / 8; in getMaxSupportedPlaintextInputSizeBytes() [all …]
|
D | RsaCipherPerformanceTest.java | 84 String digest = TestUtils.getCipherDigest(algorithm); in AndroidKeystoreRsaKeyGenerator() local 96 (digest != null) in AndroidKeystoreRsaKeyGenerator() 97 ? new String[] {digest} in AndroidKeystoreRsaKeyGenerator()
|
D | KeyGeneratorTest.java | 419 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local 420 assertNotNull(digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 435 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local 439 .setDigests(digest) in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 444 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local 456 String anotherDigest = "SHA-256".equalsIgnoreCase(digest) ? "SHA-384" : "SHA-256"; in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 466 .setDigests(digest, anotherDigest) in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() 608 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testInitWithKeyAlgorithmDigestMissingFromAuthorizedDigestFailsHelper() local 609 String anotherDigest = KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest) in testInitWithKeyAlgorithmDigestMissingFromAuthorizedDigestFailsHelper()
|
D | RSASignatureTest.java | 112 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testSmallKeyRejected() local 113 if (KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) { in testSmallKeyRejected() 118 int digestOutputSizeBits = TestUtils.getDigestOutputSizeBits(digest); in testSmallKeyRejected()
|
D | SignatureTest.java | 726 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testLongMsgKat() local 728 if ((KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) in testLongMsgKat() 878 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testInitSignFailsWhenDigestNotAuthorized() local 880 (KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest)) in testInitSignFailsWhenDigestNotAuthorized() 886 if (!KeyProperties.DIGEST_NONE.equalsIgnoreCase(digest)) { in testInitSignFailsWhenDigestNotAuthorized() 904 String digest = TestUtils.getSignatureAlgorithmDigest(algorithm); in testInitVerifyIgnoresThatDigestNotAuthorized() local 906 (KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest)) in testInitVerifyIgnoresThatDigestNotAuthorized()
|
D | SecretKeyFactoryTest.java | 104 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testGetKeySpecWithKeystoreKeyAndKeyInfoReflectsAllAuthorizations() local 105 digests = new String[] {digest}; in testGetKeySpecWithKeystoreKeyAndKeyInfoReflectsAllAuthorizations()
|
D | AndroidKeyStoreTest.java | 2392 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC() local 2393 assertNotNull(digest); in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC() 2406 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC() local 2411 TestUtils.buildUpon(goodSpec).setDigests(digest).build()); in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC() 2414 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC() local 2425 String anotherDigest = "SHA-256".equalsIgnoreCase(digest) ? "SHA-384" : "SHA-256"; in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC() 2436 .setDigests(digest, anotherDigest) in testKeyStore_OnlyOneDigestCanBeAuthorized_HMAC()
|
/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/common/device-side/util/src/com/android/compatibility/common/util/ |
D | PackageUtil.java | 98 final byte[] digest = messageDigest.digest(); in computePackageSignatureDigest() 99 final int digestLength = digest.length; in computePackageSignatureDigest() 104 final int byteHex = digest[i] & 0xFF; in computePackageSignatureDigest()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | PackageUtil.java | 130 final byte[] digest = messageDigest.digest(); in computePackageSignatureDigest() 131 final int digestLength = digest.length; in computePackageSignatureDigest() 136 final int byteHex = digest[i] & 0xFF; in computePackageSignatureDigest()
|
/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/media/libmediandkjni/ |
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/identity/src/android/security/identity/cts/ |
D | Util.java | 1067 byte[] digest = new byte[0]; in computeHkdf() 1069 mac.update(digest); in computeHkdf() 1072 digest = mac.doFinal(); in computeHkdf() 1073 if (pos + digest.length < size) { in computeHkdf() 1074 System.arraycopy(digest, 0, result, pos, digest.length); in computeHkdf() 1075 pos += digest.length; in computeHkdf() 1078 System.arraycopy(digest, 0, result, pos, size - pos); in computeHkdf()
|
/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/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/ |
D | V3RotationTest.java | 227 return messageDigest.digest(); in computeSha256DigestBytes()
|
/cts/tools/cfassembler/src/dxconvext/ |
D | ClassFileAssembler.java | 140 int amt = md.digest(bytes, 12, 20); in calcSignature()
|
/cts/tools/release-parser/src/com/android/cts/releaseparser/ |
D | FileParser.java | 140 mContentId = Base64.getEncoder().encodeToString(md.digest()); in getFileContentId()
|
D | ReleaseParser.java | 217 id = Base64.getEncoder().encodeToString(md.digest()); in getFolderContentId()
|
/cts/tests/security/src/android/keystore/cts/ |
D | AttestationApplicationId.java | 62 signatureDigests.add(sha256.digest(signature.toByteArray())); in AttestationApplicationId()
|
D | AuthorizationList.java | 357 public static String digestToString(int digest) { in digestToString() argument 358 return forMap(digestMap, "Unknown").apply(digest); in digestToString()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CertificateTest.java | 196 byte[] sha1 = messageDigest.digest(); in getFingerprint()
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | ProviderTestUtils.java | 290 return digestIn.getMessageDigest().digest(); in hash()
|
/cts/tests/app/src/android/app/cts/ |
D | DownloadManagerTestBase.java | 120 return digestIn.getMessageDigest().digest(); in hash()
|