Merge "Rename KeychainProtectionParameter to KeychainProtectionParams"
diff --git a/core/java/android/security/keystore/KeychainProtectionParameter.aidl b/core/java/android/security/keystore/KeychainProtectionParams.aidl
similarity index 93%
rename from core/java/android/security/keystore/KeychainProtectionParameter.aidl
rename to core/java/android/security/keystore/KeychainProtectionParams.aidl
index 1e2c365..0341223 100644
--- a/core/java/android/security/keystore/KeychainProtectionParameter.aidl
+++ b/core/java/android/security/keystore/KeychainProtectionParams.aidl
@@ -17,4 +17,4 @@
 package android.security.keystore;
 
 /* @hide */
-parcelable KeychainProtectionParameter;
+parcelable KeychainProtectionParams;
diff --git a/core/java/android/security/keystore/KeychainProtectionParameter.java b/core/java/android/security/keystore/KeychainProtectionParams.java
similarity index 89%
rename from core/java/android/security/keystore/KeychainProtectionParameter.java
rename to core/java/android/security/keystore/KeychainProtectionParams.java
index 2319ef5..a3cd431 100644
--- a/core/java/android/security/keystore/KeychainProtectionParameter.java
+++ b/core/java/android/security/keystore/KeychainProtectionParams.java
@@ -47,7 +47,7 @@
  *
  * @hide
  */
-public final class KeychainProtectionParameter implements Parcelable {
+public final class KeychainProtectionParams implements Parcelable {
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({TYPE_LOCKSCREEN, TYPE_CUSTOM_PASSWORD})
@@ -102,7 +102,7 @@
      * @link {#clearSecret} to overwrite its value in memory.
      * @hide
      */
-    public KeychainProtectionParameter(@UserSecretType int userSecretType,
+    public KeychainProtectionParams(@UserSecretType int userSecretType,
             @LockScreenUiFormat int lockScreenUiFormat,
             @NonNull KeyDerivationParams keyDerivationParams,
             @NonNull byte[] secret) {
@@ -112,7 +112,7 @@
         mSecret = Preconditions.checkNotNull(secret);
     }
 
-    private KeychainProtectionParameter() {
+    private KeychainProtectionParams() {
 
     }
 
@@ -155,10 +155,10 @@
     }
 
     /**
-     * Builder for creating {@link KeychainProtectionParameter}.
+     * Builder for creating {@link KeychainProtectionParams}.
      */
     public static class Builder {
-        private KeychainProtectionParameter mInstance = new KeychainProtectionParameter();
+        private KeychainProtectionParams mInstance = new KeychainProtectionParams();
 
         /**
          * Sets user secret type.
@@ -212,14 +212,14 @@
 
 
         /**
-         * Creates a new {@link KeychainProtectionParameter} instance.
+         * Creates a new {@link KeychainProtectionParams} instance.
          * The instance will include default values, if {@link setSecret}
          * or {@link setUserSecretType} were not called.
          *
          * @return new instance
          * @throws NullPointerException if some required fields were not set.
          */
-        @NonNull public KeychainProtectionParameter build() {
+        @NonNull public KeychainProtectionParams build() {
             if (mInstance.mUserSecretType == null) {
                 mInstance.mUserSecretType = TYPE_LOCKSCREEN;
             }
@@ -249,14 +249,14 @@
         Arrays.fill(mSecret, (byte) 0);
     }
 
-    public static final Parcelable.Creator<KeychainProtectionParameter> CREATOR =
-            new Parcelable.Creator<KeychainProtectionParameter>() {
-        public KeychainProtectionParameter createFromParcel(Parcel in) {
-            return new KeychainProtectionParameter(in);
+    public static final Parcelable.Creator<KeychainProtectionParams> CREATOR =
+            new Parcelable.Creator<KeychainProtectionParams>() {
+        public KeychainProtectionParams createFromParcel(Parcel in) {
+            return new KeychainProtectionParams(in);
         }
 
-        public KeychainProtectionParameter[] newArray(int length) {
-            return new KeychainProtectionParameter[length];
+        public KeychainProtectionParams[] newArray(int length) {
+            return new KeychainProtectionParams[length];
         }
     };
 
@@ -274,7 +274,7 @@
     /**
      * @hide
      */
-    protected KeychainProtectionParameter(Parcel in) {
+    protected KeychainProtectionParams(Parcel in) {
         mUserSecretType = in.readInt();
         mLockScreenUiFormat = in.readInt();
         mKeyDerivationParams = in.readTypedObject(KeyDerivationParams.CREATOR);
diff --git a/core/java/android/security/keystore/KeychainSnapshot.java b/core/java/android/security/keystore/KeychainSnapshot.java
index 71a808a..2029114 100644
--- a/core/java/android/security/keystore/KeychainSnapshot.java
+++ b/core/java/android/security/keystore/KeychainSnapshot.java
@@ -44,7 +44,7 @@
  */
 public final class KeychainSnapshot implements Parcelable {
     private int mSnapshotVersion;
-    private List<KeychainProtectionParameter> mKeychainProtectionParams;
+    private List<KeychainProtectionParams> mKeychainProtectionParams;
     private List<WrappedApplicationKey> mEntryRecoveryData;
     private byte[] mEncryptedRecoveryKeyBlob;
 
@@ -54,7 +54,7 @@
      */
     public KeychainSnapshot(
             int snapshotVersion,
-            @NonNull List<KeychainProtectionParameter> keychainProtectionParams,
+            @NonNull List<KeychainProtectionParams> keychainProtectionParams,
             @NonNull List<WrappedApplicationKey> wrappedApplicationKeys,
             @NonNull byte[] encryptedRecoveryKeyBlob) {
         mSnapshotVersion = snapshotVersion;
@@ -81,7 +81,7 @@
     /**
      * UI and key derivation parameters. Note that combination of secrets may be used.
      */
-    public @NonNull List<KeychainProtectionParameter> getKeychainProtectionParams() {
+    public @NonNull List<KeychainProtectionParams> getKeychainProtectionParams() {
         return mKeychainProtectionParams;
     }
 
@@ -135,7 +135,7 @@
          * @return This builder.
          */
         public Builder setKeychainProtectionParams(
-                @NonNull List<KeychainProtectionParameter> recoveryMetadata) {
+                @NonNull List<KeychainProtectionParams> recoveryMetadata) {
             mInstance.mKeychainProtectionParams = recoveryMetadata;
             return this;
         }
@@ -195,7 +195,7 @@
      */
     protected KeychainSnapshot(Parcel in) {
         mSnapshotVersion = in.readInt();
-        mKeychainProtectionParams = in.createTypedArrayList(KeychainProtectionParameter.CREATOR);
+        mKeychainProtectionParams = in.createTypedArrayList(KeychainProtectionParams.CREATOR);
         mEncryptedRecoveryKeyBlob = in.createByteArray();
         mEntryRecoveryData = in.createTypedArrayList(WrappedApplicationKey.CREATOR);
     }
diff --git a/core/java/android/security/keystore/RecoveryManager.java b/core/java/android/security/keystore/RecoveryManager.java
index 6177cd7..f01ed06 100644
--- a/core/java/android/security/keystore/RecoveryManager.java
+++ b/core/java/android/security/keystore/RecoveryManager.java
@@ -286,13 +286,13 @@
      * Specifies a set of secret types used for end-to-end keystore encryption. Knowing all of them
      * is necessary to recover data.
      *
-     * @param secretTypes {@link KeychainProtectionParameter#TYPE_LOCKSCREEN} or {@link
-     *     KeychainProtectionParameter#TYPE_CUSTOM_PASSWORD}
+     * @param secretTypes {@link KeychainProtectionParams#TYPE_LOCKSCREEN} or {@link
+     *     KeychainProtectionParams#TYPE_CUSTOM_PASSWORD}
      * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
      *     service.
      */
     public void setRecoverySecretTypes(
-            @NonNull @KeychainProtectionParameter.UserSecretType int[] secretTypes)
+            @NonNull @KeychainProtectionParams.UserSecretType int[] secretTypes)
             throws InternalRecoveryServiceException {
         try {
             mBinder.setRecoverySecretTypes(secretTypes);
@@ -312,7 +312,7 @@
      * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
      *     service.
      */
-    public @NonNull @KeychainProtectionParameter.UserSecretType int[] getRecoverySecretTypes()
+    public @NonNull @KeychainProtectionParams.UserSecretType int[] getRecoverySecretTypes()
             throws InternalRecoveryServiceException {
         try {
             return mBinder.getRecoverySecretTypes();
@@ -333,7 +333,7 @@
      *     service.
      */
     @NonNull
-    public @KeychainProtectionParameter.UserSecretType int[] getPendingRecoverySecretTypes()
+    public @KeychainProtectionParams.UserSecretType int[] getPendingRecoverySecretTypes()
             throws InternalRecoveryServiceException {
         try {
             return mBinder.getPendingRecoverySecretTypes();
@@ -347,7 +347,7 @@
     /**
      * Method notifies KeyStore that a user-generated secret is available. This method generates a
      * symmetric session key which a trusted remote device can use to return a recovery key. Caller
-     * should use {@link KeychainProtectionParameter#clearSecret} to override the secret value in
+     * should use {@link KeychainProtectionParams#clearSecret} to override the secret value in
      * memory.
      *
      * @param recoverySecret user generated secret together with parameters necessary to regenerate
@@ -355,7 +355,7 @@
      * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
      *     service.
      */
-    public void recoverySecretAvailable(@NonNull KeychainProtectionParameter recoverySecret)
+    public void recoverySecretAvailable(@NonNull KeychainProtectionParams recoverySecret)
             throws InternalRecoveryServiceException {
         try {
             mBinder.recoverySecretAvailable(recoverySecret);
@@ -393,7 +393,7 @@
             @NonNull byte[] verifierPublicKey,
             @NonNull byte[] vaultParams,
             @NonNull byte[] vaultChallenge,
-            @NonNull List<KeychainProtectionParameter> secrets)
+            @NonNull List<KeychainProtectionParams> secrets)
             throws BadCertificateFormatException, InternalRecoveryServiceException {
         try {
             byte[] recoveryClaim =
diff --git a/core/java/com/android/internal/widget/ILockSettings.aidl b/core/java/com/android/internal/widget/ILockSettings.aidl
index b2bab6f..6ed8973 100644
--- a/core/java/com/android/internal/widget/ILockSettings.aidl
+++ b/core/java/com/android/internal/widget/ILockSettings.aidl
@@ -21,7 +21,7 @@
 import android.os.Bundle;
 import android.security.keystore.WrappedApplicationKey;
 import android.security.keystore.KeychainSnapshot;
-import android.security.keystore.KeychainProtectionParameter;
+import android.security.keystore.KeychainProtectionParams;
 import com.android.internal.widget.ICheckCredentialProgressCallback;
 import com.android.internal.widget.VerifyCredentialResponse;
 
@@ -75,10 +75,10 @@
     void setRecoverySecretTypes(in int[] secretTypes);
     int[] getRecoverySecretTypes();
     int[] getPendingRecoverySecretTypes();
-    void recoverySecretAvailable(in KeychainProtectionParameter recoverySecret);
+    void recoverySecretAvailable(in KeychainProtectionParams recoverySecret);
     byte[] startRecoverySession(in String sessionId,
             in byte[] verifierPublicKey, in byte[] vaultParams, in byte[] vaultChallenge,
-            in List<KeychainProtectionParameter> secrets);
+            in List<KeychainProtectionParams> secrets);
     Map/*<String, byte[]>*/ recoverKeys(in String sessionId, in byte[] recoveryKeyBlob,
             in List<WrappedApplicationKey> applicationKeys);
 }
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index 879c024..7bd1ae9 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -77,7 +77,7 @@
 import android.security.keystore.AndroidKeyStoreProvider;
 import android.security.keystore.KeyProperties;
 import android.security.keystore.KeyProtection;
-import android.security.keystore.KeychainProtectionParameter;
+import android.security.keystore.KeychainProtectionParams;
 import android.security.keystore.UserNotAuthenticatedException;
 import android.security.keystore.WrappedApplicationKey;
 import android.security.keystore.KeychainSnapshot;
@@ -1997,7 +1997,7 @@
     }
 
     @Override
-    public void setRecoverySecretTypes(@NonNull @KeychainProtectionParameter.UserSecretType
+    public void setRecoverySecretTypes(@NonNull @KeychainProtectionParams.UserSecretType
             int[] secretTypes) throws RemoteException {
         mRecoverableKeyStoreManager.setRecoverySecretTypes(secretTypes);
     }
@@ -2014,7 +2014,7 @@
     }
 
     @Override
-    public void recoverySecretAvailable(@NonNull KeychainProtectionParameter recoverySecret)
+    public void recoverySecretAvailable(@NonNull KeychainProtectionParams recoverySecret)
             throws RemoteException {
         mRecoverableKeyStoreManager.recoverySecretAvailable(recoverySecret);
     }
@@ -2022,7 +2022,7 @@
     @Override
     public byte[] startRecoverySession(@NonNull String sessionId,
             @NonNull byte[] verifierPublicKey, @NonNull byte[] vaultParams,
-            @NonNull byte[] vaultChallenge, @NonNull List<KeychainProtectionParameter> secrets)
+            @NonNull byte[] vaultChallenge, @NonNull List<KeychainProtectionParams> secrets)
             throws RemoteException {
         return mRecoverableKeyStoreManager.startRecoverySession(sessionId, verifierPublicKey,
                 vaultParams, vaultChallenge, secrets);
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java
index 38745f6..95e88d7 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java
@@ -16,12 +16,12 @@
 
 package com.android.server.locksettings.recoverablekeystore;
 
-import static android.security.keystore.KeychainProtectionParameter.TYPE_LOCKSCREEN;
+import static android.security.keystore.KeychainProtectionParams.TYPE_LOCKSCREEN;
 
 import android.annotation.Nullable;
 import android.content.Context;
 import android.security.keystore.KeyDerivationParams;
-import android.security.keystore.KeychainProtectionParameter;
+import android.security.keystore.KeychainProtectionParams;
 import android.security.keystore.KeychainSnapshot;
 import android.security.keystore.WrappedApplicationKey;
 import android.util.Log;
@@ -250,12 +250,12 @@
         }
         // TODO: store raw data in RecoveryServiceMetadataEntry and generate Parcelables later
         // TODO: use Builder.
-        KeychainProtectionParameter metadata = new KeychainProtectionParameter(
+        KeychainProtectionParams metadata = new KeychainProtectionParams(
                 /*userSecretType=*/ TYPE_LOCKSCREEN,
                 /*lockScreenUiFormat=*/ getUiFormat(mCredentialType, mCredential),
                 /*keyDerivationParams=*/ KeyDerivationParams.createSha256Params(salt),
                 /*secret=*/ new byte[0]);
-        ArrayList<KeychainProtectionParameter> metadataList = new ArrayList<>();
+        ArrayList<KeychainProtectionParams> metadataList = new ArrayList<>();
         metadataList.add(metadata);
 
         int snapshotVersion = incrementSnapshotVersion(recoveryAgentUid);
@@ -307,7 +307,7 @@
      */
     private boolean shoudCreateSnapshot(int recoveryAgentUid) {
         int[] types = mRecoverableKeyStoreDb.getRecoverySecretTypes(mUserId, recoveryAgentUid);
-        if (!ArrayUtils.contains(types, KeychainProtectionParameter.TYPE_LOCKSCREEN)) {
+        if (!ArrayUtils.contains(types, KeychainProtectionParams.TYPE_LOCKSCREEN)) {
             // Only lockscreen type is supported.
             // We will need to pass extra argument to KeySyncTask to support custom pass phrase.
             return false;
@@ -330,14 +330,14 @@
      * @return The format - either pattern, pin, or password.
      */
     @VisibleForTesting
-    @KeychainProtectionParameter.LockScreenUiFormat static int getUiFormat(
+    @KeychainProtectionParams.LockScreenUiFormat static int getUiFormat(
             int credentialType, String credential) {
         if (credentialType == LockPatternUtils.CREDENTIAL_TYPE_PATTERN) {
-            return KeychainProtectionParameter.TYPE_PATTERN;
+            return KeychainProtectionParams.TYPE_PATTERN;
         } else if (isPin(credential)) {
-            return KeychainProtectionParameter.TYPE_PIN;
+            return KeychainProtectionParams.TYPE_PIN;
         } else {
-            return KeychainProtectionParameter.TYPE_PASSWORD;
+            return KeychainProtectionParams.TYPE_PASSWORD;
         }
     }
 
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java
index 0371c7e..801dc54 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java
@@ -33,7 +33,7 @@
 import android.os.ServiceSpecificException;
 import android.os.UserHandle;
 
-import android.security.keystore.KeychainProtectionParameter;
+import android.security.keystore.KeychainProtectionParams;
 import android.security.keystore.KeychainSnapshot;
 import android.security.keystore.WrappedApplicationKey;
 import android.security.keystore.RecoveryManager;
@@ -256,7 +256,7 @@
      * @hide
      */
     public void setRecoverySecretTypes(
-            @NonNull @KeychainProtectionParameter.UserSecretType int[] secretTypes)
+            @NonNull @KeychainProtectionParams.UserSecretType int[] secretTypes)
             throws RemoteException {
         checkRecoverKeyStorePermission();
         int userId = UserHandle.getCallingUserId();
@@ -291,9 +291,9 @@
     }
 
     public void recoverySecretAvailable(
-            @NonNull KeychainProtectionParameter recoverySecret) throws RemoteException {
+            @NonNull KeychainProtectionParams recoverySecret) throws RemoteException {
         int uid = Binder.getCallingUid();
-        if (recoverySecret.getLockScreenUiFormat() == KeychainProtectionParameter.TYPE_LOCKSCREEN) {
+        if (recoverySecret.getLockScreenUiFormat() == KeychainProtectionParams.TYPE_LOCKSCREEN) {
             throw new SecurityException(
                     "Caller " + uid + " is not allowed to set lock screen secret");
         }
@@ -319,13 +319,14 @@
             @NonNull byte[] verifierPublicKey,
             @NonNull byte[] vaultParams,
             @NonNull byte[] vaultChallenge,
-            @NonNull List<KeychainProtectionParameter> secrets)
+            @NonNull List<KeychainProtectionParams> secrets)
             throws RemoteException {
         checkRecoverKeyStorePermission();
         int uid = Binder.getCallingUid();
 
         if (secrets.size() != 1) {
-            throw new UnsupportedOperationException("Only a single KeychainProtectionParameter is supported");
+            throw new UnsupportedOperationException(
+                    "Only a single KeychainProtectionParams is supported");
         }
 
         PublicKey publicKey;
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
index 8bba212..2b1416e 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
@@ -404,7 +404,7 @@
     /**
      * Updates the list of user secret types used for end-to-end encryption.
      * If no secret types are set, recovery snapshot will not be created.
-     * See {@code KeychainProtectionParameter}
+     * See {@code KeychainProtectionParams}
      *
      * @param userId The userId of the profile the application is running under.
      * @param uid The uid of the application.
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java
index c1789ba..f340178 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java
@@ -16,11 +16,11 @@
 
 package com.android.server.locksettings.recoverablekeystore;
 
-import static android.security.keystore.KeychainProtectionParameter.TYPE_LOCKSCREEN;
+import static android.security.keystore.KeychainProtectionParams.TYPE_LOCKSCREEN;
 
-import static android.security.keystore.KeychainProtectionParameter.TYPE_PASSWORD;
-import static android.security.keystore.KeychainProtectionParameter.TYPE_PATTERN;
-import static android.security.keystore.KeychainProtectionParameter.TYPE_PIN;
+import static android.security.keystore.KeychainProtectionParams.TYPE_PASSWORD;
+import static android.security.keystore.KeychainProtectionParams.TYPE_PATTERN;
+import static android.security.keystore.KeychainProtectionParams.TYPE_PIN;
 
 import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PASSWORD;
 import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PATTERN;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java
index 3715742..767472a 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java
@@ -16,8 +16,8 @@
 
 package com.android.server.locksettings.recoverablekeystore;
 
-import static android.security.keystore.KeychainProtectionParameter.TYPE_LOCKSCREEN;
-import static android.security.keystore.KeychainProtectionParameter.TYPE_PASSWORD;
+import static android.security.keystore.KeychainProtectionParams.TYPE_LOCKSCREEN;
+import static android.security.keystore.KeychainProtectionParams.TYPE_PASSWORD;
 
 import static com.google.common.truth.Truth.assertThat;
 import static org.junit.Assert.assertArrayEquals;
@@ -43,7 +43,7 @@
 import android.security.keystore.KeyGenParameterSpec;
 import android.security.keystore.KeyProperties;
 import android.security.keystore.KeyDerivationParams;
-import android.security.keystore.KeychainProtectionParameter;
+import android.security.keystore.KeychainProtectionParams;
 import android.security.keystore.WrappedApplicationKey;
 import android.support.test.filters.SmallTest;
 import android.support.test.InstrumentationRegistry;
@@ -250,7 +250,7 @@
                 TEST_VAULT_PARAMS,
                 TEST_VAULT_CHALLENGE,
                 ImmutableList.of(
-                        new KeychainProtectionParameter(
+                        new KeychainProtectionParams(
                                 TYPE_LOCKSCREEN,
                                 TYPE_PASSWORD,
                                 KeyDerivationParams.createSha256Params(TEST_SALT),
@@ -269,7 +269,7 @@
                 TEST_VAULT_PARAMS,
                 TEST_VAULT_CHALLENGE,
                 ImmutableList.of(
-                        new KeychainProtectionParameter(
+                        new KeychainProtectionParams(
                                 TYPE_LOCKSCREEN,
                                 TYPE_PASSWORD,
                                 KeyDerivationParams.createSha256Params(TEST_SALT),
@@ -294,7 +294,7 @@
             fail("should have thrown");
         } catch (ServiceSpecificException e) {
             assertThat(e.getMessage()).startsWith(
-                    "Only a single KeychainProtectionParameter is supported");
+                    "Only a single KeychainProtectionParams is supported");
         }
     }
 
@@ -307,7 +307,7 @@
                     TEST_VAULT_PARAMS,
                     TEST_VAULT_CHALLENGE,
                     ImmutableList.of(
-                            new KeychainProtectionParameter(
+                            new KeychainProtectionParams(
                                     TYPE_LOCKSCREEN,
                                     TYPE_PASSWORD,
                                     KeyDerivationParams.createSha256Params(TEST_SALT),
@@ -329,7 +329,7 @@
                     vaultParams,
                     TEST_VAULT_CHALLENGE,
                     ImmutableList.of(
-                            new KeychainProtectionParameter(
+                            new KeychainProtectionParams(
                                     TYPE_LOCKSCREEN,
                                     TYPE_PASSWORD,
                                     KeyDerivationParams.createSha256Params(TEST_SALT),
@@ -362,7 +362,7 @@
                 TEST_PUBLIC_KEY,
                 TEST_VAULT_PARAMS,
                 TEST_VAULT_CHALLENGE,
-                ImmutableList.of(new KeychainProtectionParameter(
+                ImmutableList.of(new KeychainProtectionParams(
                         TYPE_LOCKSCREEN,
                         TYPE_PASSWORD,
                         KeyDerivationParams.createSha256Params(TEST_SALT),
@@ -386,7 +386,7 @@
                 TEST_PUBLIC_KEY,
                 TEST_VAULT_PARAMS,
                 TEST_VAULT_CHALLENGE,
-                ImmutableList.of(new KeychainProtectionParameter(
+                ImmutableList.of(new KeychainProtectionParams(
                         TYPE_LOCKSCREEN,
                         TYPE_PASSWORD,
                         KeyDerivationParams.createSha256Params(TEST_SALT),
@@ -418,7 +418,7 @@
                 TEST_PUBLIC_KEY,
                 TEST_VAULT_PARAMS,
                 TEST_VAULT_CHALLENGE,
-                ImmutableList.of(new KeychainProtectionParameter(
+                ImmutableList.of(new KeychainProtectionParams(
                         TYPE_LOCKSCREEN,
                         TYPE_PASSWORD,
                         KeyDerivationParams.createSha256Params(TEST_SALT),