Searched refs:plaintext (Results 1 – 8 of 8) 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 | 107 private final byte[] plaintext; field in CipherTest.KatVector 120 private KatVector(byte[] plaintext, byte[] ciphertext) { in KatVector() argument 121 this(plaintext, null, ciphertext); in KatVector() 124 private KatVector(byte[] plaintext, AlgorithmParameterSpec params, byte[] ciphertext) { in KatVector() argument 125 this.plaintext = plaintext; in KatVector() 406 byte[] plaintext = truncatePlaintextIfNecessary( in testEmptyPlaintextEncryptsAndDecrypts() 408 if (plaintext == null) { in testEmptyPlaintextEncryptsAndDecrypts() 415 byte[] ciphertext = cipher.doFinal(plaintext); in testEmptyPlaintextEncryptsAndDecrypts() 416 byte[] expectedPlaintext = plaintext; in testEmptyPlaintextEncryptsAndDecrypts() 456 byte[] plaintext = truncatePlaintextIfNecessary( in testEncryptsAndDecryptsInterrupted() [all …]
|
D | BlockCipherTestBase.java | 393 byte[] plaintext = new byte[getBlockSize()]; in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv() 394 byte[] ciphertext = doFinal(plaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv() 398 assertEquals(plaintext, decryptedPlaintext); in testIvGeneratedAndUsedWhenEncryptingWithoutExplicitIv() 720 byte[] plaintext = getKatPlaintext(); in testKatEncryptOneByteAtATime() 725 for (int plaintextIndex = 0; plaintextIndex < plaintext.length; plaintextIndex++) { in testKatEncryptOneByteAtATime() 726 byte[] output = update(new byte[] {plaintext[plaintextIndex]}); in testKatEncryptOneByteAtATime() 735 subarray(expectedCiphertext, plaintext.length, expectedCiphertext.length); in testKatEncryptOneByteAtATime() 746 for (int plaintextIndex = 0; plaintextIndex < plaintext.length; plaintextIndex++) { in testKatEncryptOneByteAtATime() 747 byte[] output = update(new byte[] {plaintext[plaintextIndex]}); in testKatEncryptOneByteAtATime() 1001 byte[] plaintext = concat(basePlaintext, new byte[lastInputBlockUnusedByteCount]); in testGeneratedPadding() [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 | AndroidKeyStoreTest.java | 2268 byte[] plaintext = "This is a test".getBytes("UTF-8"); in testKeyStore_LargeNumberOfKeysSupported_AES() 2271 byte[] ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES() 2275 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES() 2279 ciphertext = cipher.doFinal(plaintext); in testKeyStore_LargeNumberOfKeysSupported_AES() 2283 MoreAsserts.assertEquals(plaintext, cipher.doFinal(ciphertext)); in testKeyStore_LargeNumberOfKeysSupported_AES()
|
/cts/tests/tests/net/src/android/net/cts/ |
D | TunUtils.java | 140 int spi, byte[] plaintext, boolean useEncap, int expectedPacketSize) throws Exception { in awaitEspPacketNoPlaintext() argument 142 (pkt) -> isEspFailIfSpecifiedPlaintextFound(pkt, spi, useEncap, plaintext)); in awaitEspPacketNoPlaintext() 168 byte[] pkt, int spi, boolean encap, byte[] plaintext) { in isEspFailIfSpecifiedPlaintextFound() argument 169 if (Collections.indexOfSubList(Arrays.asList(pkt), Arrays.asList(plaintext)) != -1) { in isEspFailIfSpecifiedPlaintextFound()
|
/cts/tests/tests/net/ipsec/src/android/net/ipsec/ike/cts/ |
D | TunUtils.java | 130 public boolean hasPlaintextPacket(byte[] plaintext, int startIndex) { in hasPlaintextPacket() argument 133 return Collections.indexOfSubList(Arrays.asList(pkt), Arrays.asList(plaintext)) in hasPlaintextPacket() 148 int spi, byte[] plaintext, boolean useEncap, int expectedPacketSize) throws Exception { in awaitEspPacketNoPlaintext() argument 160 assertFalse(hasPlaintextPacket(plaintext, 0)); in awaitEspPacketNoPlaintext()
|
/cts/tests/tests/identity/src/android/security/identity/cts/ |
D | EphemeralKeyTest.java | 211 byte[] plaintext = null; in decryptMessageFromHolder() 215 plaintext = cipher.doFinal(messageCiphertext); in decryptMessageFromHolder() 226 return plaintext; in decryptMessageFromHolder()
|