use of com.facebook.crypto.benchmarks.mac.streams.MacLayeredOutputStream in project conceal by facebook.
the class CipherWriteBenchmark method timeAESWithHMAC.
public void timeAESWithHMAC(int reps) throws Exception {
for (int i = 0; i < reps; ++i) {
Mac mac = mHMAC.getMac();
MacLayeredOutputStream macOs = new MacLayeredOutputStream(mac, mNullOutputStream);
OutputStream aes = mAESCipher.getOutputStream(macOs);
aes.write(mData);
aes.close();
mac.doFinal();
}
}
use of com.facebook.crypto.benchmarks.mac.streams.MacLayeredOutputStream in project conceal by facebook.
the class MacBenchmark method timeJavaHmac.
public void timeJavaHmac(int reps) throws Exception {
for (int i = 0; i < reps; ++i) {
Mac mac = mHMAC.getMac();
OutputStream macOutput = new MacLayeredOutputStream(mac, new NullOutputStream());
macOutput.write(mData);
macOutput.close();
mac.doFinal();
}
}
Aggregations