Home
last modified time | relevance | path

Searched refs:ciphertext (Results 1 – 6 of 6) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DRSACipherTest.java126 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
128 assertArrayEquals(plaintext, cipher.doFinal(ciphertext)); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
154 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
155 fail("Unexpectedly produced ciphertext (" + ciphertext.length + " bytes): " in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
156 + HexEncoding.encode(ciphertext)); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
184 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
185 fail("Unexpectedly produced ciphertext (" + ciphertext.length + " bytes): " in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
186 + HexEncoding.encode(ciphertext)); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus()
217 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus()
218 fail("Unexpectedly produced ciphertext (" + ciphertext.length + " bytes): " in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus()
[all …]
DAESGCMCipherTestBase.java192 byte[] ciphertext = getKatCiphertext(); in testCiphertextBitflipDetectedWhenDecrypting()
193 ciphertext[ciphertext.length / 2] ^= 0x40; in testCiphertextBitflipDetectedWhenDecrypting()
196 doFinal(ciphertext); in testCiphertextBitflipDetectedWhenDecrypting()
205 byte[] ciphertext = getKatCiphertextWhenKatAadPresent(); in testAadBitflipDetectedWhenDecrypting()
211 doFinal(ciphertext); in testAadBitflipDetectedWhenDecrypting()
DCipherTest.java151 private final byte[] ciphertext; field in CipherTest.KatVector
163 private KatVector(byte[] plaintext, byte[] ciphertext) { in KatVector() argument
164 this(plaintext, null, ciphertext); in KatVector()
167 private KatVector(byte[] plaintext, AlgorithmParameterSpec params, byte[] ciphertext) { in KatVector() argument
169 this.ciphertext = ciphertext; in KatVector()
466 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()
586 byte[] ciphertext = byteArrayOutputStream.toByteArray(); in testEncryptsAndDecryptsUsingCipherStreams()
[all …]
DBlockCipherTestBase.java393 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()
873 byte[] ciphertext = getKatCiphertext(); in testKatDecryptOneByteAtATime()
880 for (int ciphertextIndex = 0; ciphertextIndex < ciphertext.length; ciphertextIndex++) { in testKatDecryptOneByteAtATime()
881 byte[] output = update(new byte[] {ciphertext[ciphertextIndex]}); in testKatDecryptOneByteAtATime()
[all …]
DAESCipherNistCavpKatTest.java288 testVector.ciphertext = HexEncoding.decode(value); in runTestsForKatFile()
331 byte[] input = (encrypt) ? testVector.plaintext : testVector.ciphertext; in runKatTest()
333 byte[] expectedOutput = (encrypt) ? testVector.ciphertext : testVector.plaintext; in runKatTest()
360 public byte[] ciphertext; field in AESCipherNistCavpKatTest.TestVector
DAndroidKeyStoreTest.java1880 final byte[] ciphertext = cipher.doFinal(plaintext.getBytes()); in testKeyStore_SetKeyEntry_ReplacedWithSameGeneratedSecretKey()
1891 byte[] plaintext2 = cipher.doFinal(ciphertext); in testKeyStore_SetKeyEntry_ReplacedWithSameGeneratedSecretKey()
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()