summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kevin Hufnagle <khufnagle@google.com> 2017-11-29 12:06:52 -0800
committer Kevin Hufnagle <khufnagle@google.com> 2017-11-29 12:06:52 -0800
commit8cc88984c8e62aba0d79c1b4b0e1c8c506b40df5 (patch)
tree0812746e83d84693f73e5dbdd045947de3d6375b
parentb94e697dcff23569f2b2bcc77173bed329a38242 (diff)
docs: Fixed key generator initialize method call.
The guide within the KeyGenParameterSpec class now uses the correct method (init() instead of initialize()) to initialize the key generator in the examples that show how to create AES and HMAC keys. Test: make ds-docs -j8 Bug: 69093664 Change-Id: I6a9cbe6decd895c2505538f6ad4be91cd9133714
-rw-r--r--keystore/java/android/security/keystore/KeyGenParameterSpec.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/keystore/java/android/security/keystore/KeyGenParameterSpec.java b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
index ed40b77be4a4..87677d479471 100644
--- a/keystore/java/android/security/keystore/KeyGenParameterSpec.java
+++ b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
@@ -195,7 +195,7 @@ import javax.security.auth.x500.X500Principal;
* <pre> {@code
* KeyGenerator keyGenerator = KeyGenerator.getInstance(
* KeyProperties.KEY_ALGORITHM_AES, "AndroidKeyStore");
- * keyGenerator.initialize(
+ * keyGenerator.init(
* new KeyGenParameterSpec.Builder("key2",
* KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT)
* .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
@@ -219,7 +219,7 @@ import javax.security.auth.x500.X500Principal;
* <pre> {@code
* KeyGenerator keyGenerator = KeyGenerator.getInstance(
* KeyProperties.KEY_ALGORITHM_HMAC_SHA256, "AndroidKeyStore");
- * keyGenerator.initialize(
+ * keyGenerator.init(
* new KeyGenParameterSpec.Builder("key2", KeyProperties.PURPOSE_SIGN).build());
* SecretKey key = keyGenerator.generateKey();
* Mac mac = Mac.getInstance("HmacSHA256");