Home
last modified time | relevance | path

Searched refs:doFinal (Results 1 – 21 of 21) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DBlockCipherTestBase.java176 doFinal(getKatPlaintext()); in testGetParameters()
181 doFinal(getKatCiphertext()); in testGetParameters()
393 byte[] ciphertext = doFinal(new byte[getBlockSize()]); in testGetIV()
400 doFinal(ciphertext); in testGetIV()
426 byte[] ciphertext = doFinal(plaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv()
429 byte[] decryptedPlaintext = mCipher.doFinal(ciphertext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv()
444 byte[] ciphertext = mCipher.doFinal(getKatPlaintext()); in testGeneratedIvSurvivesReset()
455 assertArrayEquals(ciphertext, mCipher.doFinal(getKatPlaintext())); in testGeneratedIvSurvivesReset()
463 assertArrayEquals(ciphertext, mCipher.doFinal(getKatPlaintext())); in testGeneratedIvSurvivesReset()
526 mCipher.doFinal(getKatPlaintext()); in testReinitializingInDecryptModeDoesNotUsePreviouslyUsedIv()
[all …]
DAESGCMCipherTestBase.java164 assertArrayEquals(expectedOutput, doFinal(input)); in assertKatTransformWithAadProvidedInOneGo()
168 assertArrayEquals(expectedOutput, doFinal(input)); in assertKatTransformWithAadProvidedInOneGo()
172 assertArrayEquals(expectedOutput, doFinal(input)); in assertKatTransformWithAadProvidedInOneGo()
185 assertArrayEquals(expectedOutput, doFinal(input)); in assertKatTransformWithAadProvidedInChunks()
196 doFinal(ciphertext); in testCiphertextBitflipDetectedWhenDecrypting()
211 doFinal(ciphertext); in testAadBitflipDetectedWhenDecrypting()
DRSACipherTest.java95 assertArrayEquals(expectedOutput, cipher.doFinal(input)); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
98 assertArrayEquals(expectedOutput, cipher.doFinal(input)); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
126 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
128 assertArrayEquals(plaintext, cipher.doFinal(ciphertext)); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
154 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
184 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
217 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus()
250 byte[] plaintext = cipher.doFinal(ciphertext); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus()
277 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingWithZeroMessage()
285 assertArrayEquals(expectedPlaintext, cipher.doFinal(ciphertext)); in testNoPaddingWithZeroMessage()
DImportWrappedKeyTest.java169 byte[] encrypted = c.doFinal(plaintext.getBytes()); in testKeyStore_ImportWrappedKey_AES()
174 assertEquals(new String(c.doFinal(encrypted)), plaintext); in testKeyStore_ImportWrappedKey_AES()
179 assertEquals(new String(c.doFinal(encrypted)), plaintext); in testKeyStore_ImportWrappedKey_AES()
294 byte[] encrypted = c.doFinal(plaintext.getBytes()); in testKeyStore_ImportWrappedKey_3DES()
299 assertEquals(new String(c.doFinal(encrypted)), plaintext); in testKeyStore_ImportWrappedKey_3DES()
304 assertEquals(new String(c.doFinal(encrypted)), plaintext); in testKeyStore_ImportWrappedKey_3DES()
363 byte[] encrypted = c.doFinal(plaintext.getBytes()); in testKeyStore_ImportWrappedKey_RSA()
366 assertEquals(new String(c.doFinal(encrypted)), plaintext); in testKeyStore_ImportWrappedKey_RSA()
370 encrypted = c.doFinal(plaintext.getBytes()); in testKeyStore_ImportWrappedKey_RSA()
373 assertEquals(new String(c.doFinal(encrypted)), plaintext); in testKeyStore_ImportWrappedKey_RSA()
[all …]
DMacTest.java283 byte[] macBytes = mac.doFinal(); in testMacGeneratedForEmptyMessage()
306 byte[] macBytes = mac.doFinal(message); in testMacGeneratedByAndroidKeyStoreVerifiesByAndroidKeyStore()
329 byte[] macBytes = mac.doFinal(message); in testMacGeneratedByAndroidKeyStoreVerifiesByHighestPriorityProvider()
354 byte[] macBytes = mac.doFinal(message); in testMacGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore()
542 byte[] mac2 = m.doFinal(message); in assertMacVerifiesOneShot()
558 byte[] mac2 = m.doFinal(message); in assertMacDoesNotVerifyOneShot()
576 byte[] mac2 = m.doFinal(); in assertMacVerifiesFedOneByteAtATime()
601 byte[] mac2 = m.doFinal(); in assertMacVerifiesFedUsingFixedSizeChunks()
DCipherTest.java466 byte[] ciphertext = cipher.doFinal(plaintext); in testEmptyPlaintextEncryptsAndDecrypts()
479 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testEmptyPlaintextEncryptsAndDecrypts()
519 byte[] ciphertext = cipher.doFinal(plaintext); in testEncryptsAndDecryptsInterrupted()
532 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testEncryptsAndDecryptsInterrupted()
624 byte[] actualPlaintext = cipher.doFinal(ciphertext); in isDecryptValid()
707 byte[] ciphertext = cipher.doFinal(plaintext); in testEmptyPlaintextEncryptsAndDecryptsWhenUnlockedRequired()
837 byte[] ciphertext = cipher.doFinal(plaintext); in testCiphertextGeneratedByAndroidKeyStoreDecryptsByAndroidKeyStore()
850 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testCiphertextGeneratedByAndroidKeyStoreDecryptsByAndroidKeyStore()
927 byte[] ciphertext = cipher.doFinal(plaintext); in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
962 byte[] actualPlaintext = cipher.doFinal(ciphertext); in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
[all …]
DAndroidKeyStoreTest.java1880 final byte[] ciphertext = cipher.doFinal(plaintext.getBytes()); in testKeyStore_SetKeyEntry_ReplacedWithSameGeneratedSecretKey()
1891 byte[] plaintext2 = cipher.doFinal(ciphertext); in testKeyStore_SetKeyEntry_ReplacedWithSameGeneratedSecretKey()
2055 encrypt.doFinal(plainText); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
2354 byte[] ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES()
2358 assertArrayEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()
2362 ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES()
2366 assertArrayEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()
2425 mac.doFinal(message)); in testKeyStore_LargeNumberOfKeysSupported_HMAC()
2432 mac.doFinal(message)); in testKeyStore_LargeNumberOfKeysSupported_HMAC()
DKeyGeneratorTest.java850 byte[] cipherText = msg == null ? cipher.doFinal() : cipher.doFinal(msg); in assertUniqueAesEncryptionForNKeys()
900 byte[] macSign = mac.doFinal(msg); in testUniquenessOfHmacKeys()
DAESCipherNistCavpKatTest.java332 byte[] actualOutput = cipher.doFinal(input); in runKatTest()
/cts/tests/tests/keystore/src/android/keystore/cts/performance/
DDesCipherPerformanceTest.java126 mCipher.doFinal(getMessage()); in measure()
146 mEncryptedMessage = mCipher.doFinal(getMessage()); in initialSetUp()
157 mCipher.doFinal(mEncryptedMessage); in measure()
DAesCipherPerformanceTest.java124 mCipher.doFinal(getMessage()); in measure()
144 mEncryptedMessage = mCipher.doFinal(getMessage()); in initialSetUp()
155 mCipher.doFinal(mEncryptedMessage); in measure()
DRsaCipherPerformanceTest.java131 mCipher.doFinal(getMessage()); in measure()
151 mEncryptedMessage = mCipher.doFinal(getMessage()); in initialSetUp()
162 mCipher.doFinal(mEncryptedMessage); in measure()
DHmacMacPerformanceTest.java109 mMac.doFinal(); in measure()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/biometrics/
DAbstractUserAuthenticationMacTest.java57 mMac.doFinal(payload); in doKeystoreOperation()
DUtils.java146 return cipher.doFinal(data); in doEncrypt()
/cts/tests/tests/identity/src/android/security/identity/cts/
DEphemeralKeyTest.java192 messageCiphertext = cipher.doFinal(messagePlaintext); // This includes the auth tag in encryptMessageToHolder()
216 plaintext = cipher.doFinal(messageCiphertext); in decryptMessageFromHolder()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DEnrollmentSpecificIdTest.java216 byte[] prk = mac.doFinal(ikm); in computeHkdf()
226 digest = mac.doFinal(); in computeHkdf()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DAuthenticationBoundKeyTestActivity.java267 cipher.doFinal(SECRET_BYTE_ARRAY); in tryEncryptWithLockscreenKey()
305 cipher.doFinal(SECRET_BYTE_ARRAY); in tryEncryptWithFingerprintKey()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DLskfBoundKeysTest.java154 cipher.doFinal(SECRET_BYTE_ARRAY); in tryEncrypt()
DUnlockedDeviceRequiredKeysTest.java211 cipher.doFinal(SECRET_BYTE_ARRAY); in tryEncrypt()
DFingerprintBoundKeysTest.java263 mCipher.doFinal(SECRET_BYTE_ARRAY); in encryptInternal()