From a80eee052dd729c2898829fab42a5584d6f5eaf0 Mon Sep 17 00:00:00 2001 From: Alex Klyubin Date: Wed, 1 Apr 2015 16:03:03 -0700 Subject: Improve the AndroidKeyStore-backed HMAC state machine. This defers the start of a new KeyStore operation after Mac.doFinal until the next Mac.update or .doFinal. Previously, the a new KeyStore operation was started immediately, at the end of doFinal. Bug: 18088752 Change-Id: I2d594067ef261f519631d09f7a6087b715801656 --- keystore/java/android/security/KeyStoreCipherSpi.java | 2 -- 1 file changed, 2 deletions(-) (limited to 'keystore/java/android/security/KeyStoreCipherSpi.java') diff --git a/keystore/java/android/security/KeyStoreCipherSpi.java b/keystore/java/android/security/KeyStoreCipherSpi.java index 5219086..afb5e36 100644 --- a/keystore/java/android/security/KeyStoreCipherSpi.java +++ b/keystore/java/android/security/KeyStoreCipherSpi.java @@ -264,8 +264,6 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry @Override protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException { - ensureKeystoreOperationInitialized(); - byte[] outputCopy = engineUpdate(input, inputOffset, inputLen); if (outputCopy == null) { return 0; -- cgit v1.1