diff options
author | Alex Klyubin <klyubin@google.com> | 2015-05-06 15:43:52 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-05-06 15:59:56 -0700 |
commit | 4d5443f37f2bc58be8d22ed50024c39a5a1fbc8f (patch) | |
tree | 016b3ed1215270328be03600065a50c341c10137 /keystore/java/android/security/KeyStoreCipherSpi.java | |
parent | 6223ec129b256526d8c30920271b2ee3960bcf1f (diff) |
Define String constants for AndroidKeyStore crypto.
This defines the String enum values based on JCA standard names for
key algorithm, block mode, padding schemes, and digests. This should
make it safer to interact with AndroidKeyStore code that uses JCA
strings. This was requested by API Council.
Bug: 18088752
Change-Id: I241d9225a13b85479d0a84e49d0a98cbc77e5817
Diffstat (limited to 'keystore/java/android/security/KeyStoreCipherSpi.java')
-rw-r--r-- | keystore/java/android/security/KeyStoreCipherSpi.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/keystore/java/android/security/KeyStoreCipherSpi.java b/keystore/java/android/security/KeyStoreCipherSpi.java index 094aa75bf4b2..28bc3d20650d 100644 --- a/keystore/java/android/security/KeyStoreCipherSpi.java +++ b/keystore/java/android/security/KeyStoreCipherSpi.java @@ -494,7 +494,8 @@ public abstract class KeyStoreCipherSpi extends CipherSpi implements KeyStoreCry } if ((mIv != null) && (mIv.length > 0)) { try { - AlgorithmParameters params = AlgorithmParameters.getInstance("AES"); + AlgorithmParameters params = + AlgorithmParameters.getInstance(KeyStoreKeyProperties.Algorithm.AES); params.init(new IvParameterSpec(mIv)); return params; } catch (NoSuchAlgorithmException e) { |