RecordNullCipher extends RecordCipher { @Override public void encrypt(Record record) throws CryptoException { LOGGER.debug("Encrypting Record: (null cipher)"); record.prepareComputations(); byte[] cleanBytes = record.getCleanProtocolMessageBytes().getValue(); record.setProtocolMessageBytes(cleanBytes); } RecordNullCipher(TlsContext context); @Override void encrypt(Record record); @Override void decrypt(Record record); @Override void encrypt(BlobRecord br); @Override void decrypt(BlobRecord br);  }
@Test public void testEncrypt() throws CryptoException { record.setCleanProtocolMessageBytes(data); recordCipher.encrypt(record); assertArrayEquals(record.getProtocolMessageBytes().getValue(), data); }