Home
last modified time | relevance | path

Searched refs:plaintext (Results 1 – 8 of 8) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DRSACipherTest.java87 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 …]
DCipherTest.java107 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 …]
DBlockCipherTestBase.java393 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 …]
DAESCipherNistCavpKatTest.java248 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
DAndroidKeyStoreTest.java2268 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/
DTunUtils.java140 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/
DTunUtils.java130 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/
DEphemeralKeyTest.java211 byte[] plaintext = null; in decryptMessageFromHolder()
215 plaintext = cipher.doFinal(messageCiphertext); in decryptMessageFromHolder()
226 return plaintext; in decryptMessageFromHolder()