Home
last modified time | relevance | path

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

12

/cts/tests/tests/keystore/src/android/keystore/cts/
DTestUtils.java594 MessageDigest digest = MessageDigest.getInstance("SHA-512"); in generateLargeKatMsg() local
598 seed = digest.digest(seed); in generateLargeKatMsg()
720 String digest = algorithmUpperCase.substring(0, withIndex); in getSignatureAlgorithmDigest() local
721 if (digest.startsWith("SHA")) { in getSignatureAlgorithmDigest()
722 digest = "SHA-" + digest.substring("SHA".length()); in getSignatureAlgorithmDigest()
724 return digest; in getSignatureAlgorithmDigest()
759 String digest = getSignatureAlgorithmDigest(algorithm); in isKeyLongEnoughForSignatureAlgorithm() local
760 int digestOutputSizeBits = getDigestOutputSizeBits(digest); in isKeyLongEnoughForSignatureAlgorithm()
799 String digest = getCipherDigest(transformation); in getMaxSupportedPlaintextInputSizeBytes() local
800 int digestOutputSizeBytes = (getDigestOutputSizeBits(digest) + 7) / 8; in getMaxSupportedPlaintextInputSizeBytes()
[all …]
DKeyGeneratorTest.java421 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local
422 assertNotNull(digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper()
437 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local
441 .setDigests(digest) in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper()
446 Arrays.asList(TestUtils.getKeyInfo(key).getDigests()), digest); in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper() local
458 String anotherDigest = "SHA-256".equalsIgnoreCase(digest) ? "SHA-384" : "SHA-256"; in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper()
468 .setDigests(digest, anotherDigest) in testHmacKeyOnlyOneDigestCanBeAuthorizedHelper()
610 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testInitWithKeyAlgorithmDigestMissingFromAuthorizedDigestFailsHelper() local
611 String anotherDigest = KeyProperties.DIGEST_SHA256.equalsIgnoreCase(digest) in testInitWithKeyAlgorithmDigestMissingFromAuthorizedDigestFailsHelper()
DRSASignatureTest.java112 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()
DSecretKeyFactoryTest.java104 String digest = TestUtils.getHmacAlgorithmDigest(algorithm); in testGetKeySpecWithKeystoreKeyAndKeyInfoReflectsAllAuthorizations() local
105 digests = new String[] {digest}; in testGetKeySpecWithKeystoreKeyAndKeyInfoReflectsAllAuthorizations()
DSignatureTest.java726 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()
DAndroidKeyStoreTest.java2392 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/src/com/android/compatibility/common/util/
DPackageUtil.java98 final byte[] digest = messageDigest.digest(); in computePackageSignatureDigest()
99 final int digestLength = digest.length; in computePackageSignatureDigest()
104 final int byteHex = digest[i] & 0xFF; in computePackageSignatureDigest()
DMediaUtils.java1228 return convertByteArrayToHEXString(md.digest()); in getImageMD5Checksum()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DPackageUtil.java112 final byte[] digest = messageDigest.digest(); in computePackageSignatureDigest()
113 final int digestLength = digest.length; in computePackageSignatureDigest()
118 final int byteHex = digest[i] & 0xFF; in computePackageSignatureDigest()
DMediaUtils.java1231 return convertByteArrayToHEXString(md.digest()); in getImageMD5Checksum()
/cts/tools/utils/
Dcertificates.py52 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/
Dmd5_utils.h42 void MD5Final(unsigned char digest[16], struct MD5Context *context);
Dmd5_utils.cpp108 MD5Final(md5byte digest[16], struct MD5Context *ctx) { in MD5Final()
135 memcpy(digest, ctx->buf, 16); in MD5Final()
/cts/tools/cts-api-coverage/src/com/android/cts/apicoverage/
DTestSuiteContentReport.java277 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/
DV3RotationTest.java227 return messageDigest.digest(); in computeSha256DigestBytes()
/cts/tools/cfassembler/src/dxconvext/
DClassFileAssembler.java140 int amt = md.digest(bytes, 12, 20); in calcSignature()
/cts/tools/release-parser/src/com/android/cts/releaseparser/
DFileParser.java140 mContentId = Base64.getEncoder().encodeToString(md.digest()); in getFileContentId()
DReleaseParser.java217 id = Base64.getEncoder().encodeToString(md.digest()); in getFolderContentId()
DTestSuiteParser.java605 id = Base64.getEncoder().encodeToString(md.digest()); in getTestModuleContentId()
/cts/tests/security/src/android/keystore/cts/
DAttestationApplicationId.java62 signatureDigests.add(sha256.digest(signature.toByteArray())); in AttestationApplicationId()
DAuthorizationList.java357 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/
DCertificateTest.java196 byte[] sha1 = messageDigest.digest(); in getFingerprint()
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java262 return digestIn.getMessageDigest().digest(); in hash()
/cts/tests/app/src/android/app/cts/
DDownloadManagerTestBase.java104 return digestIn.getMessageDigest().digest(); in hash()
/cts/tests/tests/carrierapi/src/android/carrierapi/cts/
DCarrierApiTest.java210 return bytesToHexString(md.digest(pInfo.signatures[0].toByteArray())); in getCertHash()

12