diff options
Diffstat (limited to 'keystore/java/android/security/KeyStoreHmacSpi.java')
-rw-r--r-- | keystore/java/android/security/KeyStoreHmacSpi.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/keystore/java/android/security/KeyStoreHmacSpi.java b/keystore/java/android/security/KeyStoreHmacSpi.java index 841b90d..1297cc2 100644 --- a/keystore/java/android/security/KeyStoreHmacSpi.java +++ b/keystore/java/android/security/KeyStoreHmacSpi.java @@ -103,8 +103,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp if (opResult == null) { throw new KeyStoreConnectException(); } else if (opResult.resultCode != KeyStore.NO_ERROR) { - throw new CryptoOperationException("Failed to start keystore operation", - KeymasterUtils.getExceptionForKeymasterError(opResult.resultCode)); + throw KeymasterUtils.getCryptoOperationException(opResult.resultCode); } mOperationToken = opResult.token; if (mOperationToken == null) { @@ -131,7 +130,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp try { output = mChunkedStreamer.update(input, offset, len); } catch (KeymasterException e) { - throw new CryptoOperationException("Keystore operation failed", e); + throw KeymasterUtils.getCryptoOperationException(e); } if ((output != null) && (output.length != 0)) { throw new CryptoOperationException("Update operation unexpectedly produced output"); @@ -148,7 +147,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp try { result = mChunkedStreamer.doFinal(null, 0, 0); } catch (KeymasterException e) { - throw new CryptoOperationException("Keystore operation failed", e); + throw KeymasterUtils.getCryptoOperationException(e); } engineReset(); |