Searched refs:plaintext (Results 1 – 5 of 5) sorted by relevance
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | RSACipherTest.java | 87 byte[] plaintext = in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() 91 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() 93 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() 114 byte[] plaintext = TestUtils.getBigIntegerMagnitudeBytes(modulus); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus() 118 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus() 142 byte[] plaintext = in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus() 147 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus() 175 byte[] plaintext = new byte[((modulus.bitLength() + 7) / 8) + 1]; in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus() 179 byte[] ciphertext = cipher.doFinal(plaintext); in testNoPaddingEncryptionFailsWithPlaintextOneByteLongerThanModulus() 211 byte[] plaintext = cipher.doFinal(ciphertext); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus() [all …]
|
D | CipherTest.java | 80 private final byte[] plaintext; field in CipherTest.KatVector 93 private KatVector(byte[] plaintext, byte[] ciphertext) { in KatVector() argument 94 this(plaintext, null, ciphertext); in KatVector() 97 private KatVector(byte[] plaintext, AlgorithmParameterSpec params, byte[] ciphertext) { in KatVector() argument 98 this.plaintext = plaintext; in KatVector() 322 byte[] plaintext = truncatePlaintextIfNecessary( in testEmptyPlaintextEncryptsAndDecrypts() 324 if (plaintext == null) { in testEmptyPlaintextEncryptsAndDecrypts() 331 byte[] ciphertext = cipher.doFinal(plaintext); in testEmptyPlaintextEncryptsAndDecrypts() 332 byte[] expectedPlaintext = plaintext; in testEmptyPlaintextEncryptsAndDecrypts() 367 byte[] plaintext = truncatePlaintextIfNecessary( in testCiphertextGeneratedByAndroidKeyStoreDecryptsByAndroidKeyStore() [all …]
|
D | AESCipherNistCavpKatTest.java | 248 testVector.plaintext = HexEncoding.decode(value); in runTestsForKatFile() 293 byte[] input = (encrypt) ? testVector.plaintext : testVector.ciphertext; in runKatTest() 295 byte[] expectedOutput = (encrypt) ? testVector.ciphertext : testVector.plaintext; in runKatTest() 321 public byte[] plaintext; field in AESCipherNistCavpKatTest.TestVector
|
D | BlockCipherTestBase.java | 388 byte[] plaintext = new byte[getBlockSize()]; in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv() 389 byte[] ciphertext = doFinal(plaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv() 393 assertEquals(plaintext, decryptedPlaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv() 715 byte[] plaintext = getKatPlaintext(); in testKatEncryptOneByteAtATime() 720 for (int plaintextIndex = 0; plaintextIndex < plaintext.length; plaintextIndex++) { in testKatEncryptOneByteAtATime() 721 byte[] output = update(new byte[] {plaintext[plaintextIndex]}); in testKatEncryptOneByteAtATime() 730 subarray(expectedCiphertext, plaintext.length, expectedCiphertext.length); in testKatEncryptOneByteAtATime() 741 for (int plaintextIndex = 0; plaintextIndex < plaintext.length; plaintextIndex++) { in testKatEncryptOneByteAtATime() 742 byte[] output = update(new byte[] {plaintext[plaintextIndex]}); in testKatEncryptOneByteAtATime() 996 byte[] plaintext = concat(basePlaintext, new byte[lastInputBlockUnusedByteCount]); in testGeneratedPadding() [all …]
|
D | AndroidKeyStoreTest.java | 2281 byte[] plaintext = "This is a test".getBytes("UTF-8"); in testKeyStore_LargeNumberOfKeysSupported_AES() 2284 byte[] ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES() 2288 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES() 2292 ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES() 2296 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()
|