Loading keystore/java/android/security/AndroidKeyStoreProvider.java +3 −3 Original line number Diff line number Diff line Loading @@ -104,13 +104,13 @@ public class AndroidKeyStoreProvider extends Provider { * * <p>The following primitives are supported: {@link Cipher} and {@link Mac}. * * @return KeyStore operation handle or {@code null} if the provided primitive's KeyStore * operation is not in progress. * @return KeyStore operation handle or {@code 0} if the provided primitive's KeyStore operation * is not in progress. * * @throws IllegalArgumentException if the provided primitive is not supported or is not backed * by AndroidKeyStore provider. */ public static Long getKeyStoreOperationHandle(Object cryptoPrimitive) { public static long getKeyStoreOperationHandle(Object cryptoPrimitive) { if (cryptoPrimitive == null) { throw new NullPointerException(); } Loading keystore/java/android/security/KeyStoreCipherSpi.java +7 −4 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry * error conditions in between. */ private IBinder mOperationToken; private Long mOperationHandle; private long mOperationHandle; private KeyStoreCryptoOperationChunkedStreamer mMainDataStreamer; /** Loading Loading @@ -247,7 +247,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry mIvHasBeenUsed = false; mAdditionalEntropyForBegin = null; mOperationToken = null; mOperationHandle = null; mOperationHandle = 0; mMainDataStreamer = null; mCachedException = null; } Loading @@ -258,7 +258,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry mOperationToken = null; mKeyStore.abort(operationToken); } mOperationHandle = null; mOperationHandle = 0; mMainDataStreamer = null; mAdditionalEntropyForBegin = null; mCachedException = null; Loading Loading @@ -322,6 +322,9 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry if (mOperationToken == null) { throw new IllegalStateException("Keystore returned null operation token"); } if (mOperationHandle == 0) { throw new IllegalStateException("Keystore returned invalid operation handle"); } loadAlgorithmSpecificParametersFromBeginResult(keymasterOutputArgs); mFirstOperationInitiated = true; Loading Loading @@ -471,7 +474,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry } @Override public Long getOperationHandle() { public long getOperationHandle() { return mOperationHandle; } Loading keystore/java/android/security/KeyStoreCryptoOperation.java +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ public interface KeyStoreCryptoOperation { /** * Gets the KeyStore operation handle of this crypto operation. * * @return handle or {@code null} if the KeyStore operation is not in progress. * @return handle or {@code 0} if the KeyStore operation is not in progress. */ Long getOperationHandle(); long getOperationHandle(); } keystore/java/android/security/KeyStoreHmacSpi.java +7 −4 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp // Fields below are reset when engineDoFinal succeeds. private KeyStoreCryptoOperationChunkedStreamer mChunkedStreamer; private IBinder mOperationToken; private Long mOperationHandle; private long mOperationHandle; protected KeyStoreHmacSpi(int keymasterDigest) { mKeymasterDigest = keymasterDigest; Loading Loading @@ -128,7 +128,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp mOperationToken = null; mKeyStore.abort(operationToken); } mOperationHandle = null; mOperationHandle = 0; mChunkedStreamer = null; } Loading @@ -138,7 +138,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp mOperationToken = null; mKeyStore.abort(operationToken); } mOperationHandle = null; mOperationHandle = 0; mChunkedStreamer = null; } Loading Loading @@ -187,6 +187,9 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp if (mOperationToken == null) { throw new IllegalStateException("Keystore returned null operation token"); } if (mOperationHandle == 0) { throw new IllegalStateException("Keystore returned invalid operation handle"); } mChunkedStreamer = new KeyStoreCryptoOperationChunkedStreamer( new KeyStoreCryptoOperationChunkedStreamer.MainDataStream( Loading Loading @@ -249,7 +252,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp } @Override public Long getOperationHandle() { public long getOperationHandle() { return mOperationHandle; } } Loading
keystore/java/android/security/AndroidKeyStoreProvider.java +3 −3 Original line number Diff line number Diff line Loading @@ -104,13 +104,13 @@ public class AndroidKeyStoreProvider extends Provider { * * <p>The following primitives are supported: {@link Cipher} and {@link Mac}. * * @return KeyStore operation handle or {@code null} if the provided primitive's KeyStore * operation is not in progress. * @return KeyStore operation handle or {@code 0} if the provided primitive's KeyStore operation * is not in progress. * * @throws IllegalArgumentException if the provided primitive is not supported or is not backed * by AndroidKeyStore provider. */ public static Long getKeyStoreOperationHandle(Object cryptoPrimitive) { public static long getKeyStoreOperationHandle(Object cryptoPrimitive) { if (cryptoPrimitive == null) { throw new NullPointerException(); } Loading
keystore/java/android/security/KeyStoreCipherSpi.java +7 −4 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry * error conditions in between. */ private IBinder mOperationToken; private Long mOperationHandle; private long mOperationHandle; private KeyStoreCryptoOperationChunkedStreamer mMainDataStreamer; /** Loading Loading @@ -247,7 +247,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry mIvHasBeenUsed = false; mAdditionalEntropyForBegin = null; mOperationToken = null; mOperationHandle = null; mOperationHandle = 0; mMainDataStreamer = null; mCachedException = null; } Loading @@ -258,7 +258,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry mOperationToken = null; mKeyStore.abort(operationToken); } mOperationHandle = null; mOperationHandle = 0; mMainDataStreamer = null; mAdditionalEntropyForBegin = null; mCachedException = null; Loading Loading @@ -322,6 +322,9 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry if (mOperationToken == null) { throw new IllegalStateException("Keystore returned null operation token"); } if (mOperationHandle == 0) { throw new IllegalStateException("Keystore returned invalid operation handle"); } loadAlgorithmSpecificParametersFromBeginResult(keymasterOutputArgs); mFirstOperationInitiated = true; Loading Loading @@ -471,7 +474,7 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry } @Override public Long getOperationHandle() { public long getOperationHandle() { return mOperationHandle; } Loading
keystore/java/android/security/KeyStoreCryptoOperation.java +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ public interface KeyStoreCryptoOperation { /** * Gets the KeyStore operation handle of this crypto operation. * * @return handle or {@code null} if the KeyStore operation is not in progress. * @return handle or {@code 0} if the KeyStore operation is not in progress. */ Long getOperationHandle(); long getOperationHandle(); }
keystore/java/android/security/KeyStoreHmacSpi.java +7 −4 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp // Fields below are reset when engineDoFinal succeeds. private KeyStoreCryptoOperationChunkedStreamer mChunkedStreamer; private IBinder mOperationToken; private Long mOperationHandle; private long mOperationHandle; protected KeyStoreHmacSpi(int keymasterDigest) { mKeymasterDigest = keymasterDigest; Loading Loading @@ -128,7 +128,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp mOperationToken = null; mKeyStore.abort(operationToken); } mOperationHandle = null; mOperationHandle = 0; mChunkedStreamer = null; } Loading @@ -138,7 +138,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp mOperationToken = null; mKeyStore.abort(operationToken); } mOperationHandle = null; mOperationHandle = 0; mChunkedStreamer = null; } Loading Loading @@ -187,6 +187,9 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp if (mOperationToken == null) { throw new IllegalStateException("Keystore returned null operation token"); } if (mOperationHandle == 0) { throw new IllegalStateException("Keystore returned invalid operation handle"); } mChunkedStreamer = new KeyStoreCryptoOperationChunkedStreamer( new KeyStoreCryptoOperationChunkedStreamer.MainDataStream( Loading Loading @@ -249,7 +252,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi implements KeyStoreCryptoOp } @Override public Long getOperationHandle() { public long getOperationHandle() { return mOperationHandle; } }