use of com.facebook.crypto.benchmarks.mac.streams.MacLayeredInputStream in project conceal by facebook.
the class CipherReadBenchmark method timeAESWithHmacRead.
public void timeAESWithHmacRead(int reps) throws Exception {
for (int i = 0; i < reps; ++i) {
ByteArrayInputStream cipheredInput = new ByteArrayInputStream(mAESCipherText);
Mac mac = mHMAC.getMac();
InputStream macStream = new MacLayeredInputStream(mac, cipheredInput);
InputStream input = mAESCipher.getInputStream(macStream);
readFully(input, new NullOutputStream());
mac.doFinal();
input.close();
}
}
Aggregations