Loading core/java/android/security/keystore/KeychainProtectionParameter.aidl→core/java/android/security/keystore/KeychainProtectionParams.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -17,4 +17,4 @@ package android.security.keystore; /* @hide */ parcelable KeychainProtectionParameter; parcelable KeychainProtectionParams; core/java/android/security/keystore/KeychainProtectionParameter.java→core/java/android/security/keystore/KeychainProtectionParams.java +14 −14 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ import java.util.Arrays; * * @hide */ public final class KeychainProtectionParameter implements Parcelable { public final class KeychainProtectionParams implements Parcelable { /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({TYPE_LOCKSCREEN, TYPE_CUSTOM_PASSWORD}) Loading Loading @@ -102,7 +102,7 @@ public final class KeychainProtectionParameter implements Parcelable { * @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) { Loading @@ -112,7 +112,7 @@ public final class KeychainProtectionParameter implements Parcelable { mSecret = Preconditions.checkNotNull(secret); } private KeychainProtectionParameter() { private KeychainProtectionParams() { } Loading Loading @@ -155,10 +155,10 @@ public final class KeychainProtectionParameter implements Parcelable { } /** * 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. Loading Loading @@ -212,14 +212,14 @@ public final class KeychainProtectionParameter implements Parcelable { /** * 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; } Loading Loading @@ -249,14 +249,14 @@ public final class KeychainProtectionParameter implements Parcelable { 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]; } }; Loading @@ -274,7 +274,7 @@ public final class KeychainProtectionParameter implements Parcelable { /** * @hide */ protected KeychainProtectionParameter(Parcel in) { protected KeychainProtectionParams(Parcel in) { mUserSecretType = in.readInt(); mLockScreenUiFormat = in.readInt(); mKeyDerivationParams = in.readTypedObject(KeyDerivationParams.CREATOR); Loading core/java/android/security/keystore/KeychainSnapshot.java +5 −5 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ import java.util.List; */ public final class KeychainSnapshot implements Parcelable { private int mSnapshotVersion; private List<KeychainProtectionParameter> mKeychainProtectionParams; private List<KeychainProtectionParams> mKeychainProtectionParams; private List<WrappedApplicationKey> mEntryRecoveryData; private byte[] mEncryptedRecoveryKeyBlob; Loading @@ -54,7 +54,7 @@ public final class KeychainSnapshot implements Parcelable { */ public KeychainSnapshot( int snapshotVersion, @NonNull List<KeychainProtectionParameter> keychainProtectionParams, @NonNull List<KeychainProtectionParams> keychainProtectionParams, @NonNull List<WrappedApplicationKey> wrappedApplicationKeys, @NonNull byte[] encryptedRecoveryKeyBlob) { mSnapshotVersion = snapshotVersion; Loading @@ -81,7 +81,7 @@ public final class KeychainSnapshot implements Parcelable { /** * 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; } Loading Loading @@ -135,7 +135,7 @@ public final class KeychainSnapshot implements Parcelable { * @return This builder. */ public Builder setKeychainProtectionParams( @NonNull List<KeychainProtectionParameter> recoveryMetadata) { @NonNull List<KeychainProtectionParams> recoveryMetadata) { mInstance.mKeychainProtectionParams = recoveryMetadata; return this; } Loading Loading @@ -195,7 +195,7 @@ public final class KeychainSnapshot implements Parcelable { */ 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); } Loading core/java/android/security/keystore/RecoveryManager.java +8 −8 Original line number Diff line number Diff line Loading @@ -286,13 +286,13 @@ public class RecoveryManager { * 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); Loading @@ -312,7 +312,7 @@ public class RecoveryManager { * @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(); Loading @@ -333,7 +333,7 @@ public class RecoveryManager { * service. */ @NonNull public @KeychainProtectionParameter.UserSecretType int[] getPendingRecoverySecretTypes() public @KeychainProtectionParams.UserSecretType int[] getPendingRecoverySecretTypes() throws InternalRecoveryServiceException { try { return mBinder.getPendingRecoverySecretTypes(); Loading @@ -347,7 +347,7 @@ public class RecoveryManager { /** * 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 Loading @@ -355,7 +355,7 @@ public class RecoveryManager { * @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); Loading Loading @@ -393,7 +393,7 @@ public class RecoveryManager { @NonNull byte[] verifierPublicKey, @NonNull byte[] vaultParams, @NonNull byte[] vaultChallenge, @NonNull List<KeychainProtectionParameter> secrets) @NonNull List<KeychainProtectionParams> secrets) throws BadCertificateFormatException, InternalRecoveryServiceException { try { byte[] recoveryClaim = Loading core/java/com/android/internal/widget/ILockSettings.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import android.app.trust.IStrongAuthTracker; 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; Loading Loading @@ -75,10 +75,10 @@ interface ILockSettings { 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); } Loading
core/java/android/security/keystore/KeychainProtectionParameter.aidl→core/java/android/security/keystore/KeychainProtectionParams.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -17,4 +17,4 @@ package android.security.keystore; /* @hide */ parcelable KeychainProtectionParameter; parcelable KeychainProtectionParams;
core/java/android/security/keystore/KeychainProtectionParameter.java→core/java/android/security/keystore/KeychainProtectionParams.java +14 −14 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ import java.util.Arrays; * * @hide */ public final class KeychainProtectionParameter implements Parcelable { public final class KeychainProtectionParams implements Parcelable { /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({TYPE_LOCKSCREEN, TYPE_CUSTOM_PASSWORD}) Loading Loading @@ -102,7 +102,7 @@ public final class KeychainProtectionParameter implements Parcelable { * @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) { Loading @@ -112,7 +112,7 @@ public final class KeychainProtectionParameter implements Parcelable { mSecret = Preconditions.checkNotNull(secret); } private KeychainProtectionParameter() { private KeychainProtectionParams() { } Loading Loading @@ -155,10 +155,10 @@ public final class KeychainProtectionParameter implements Parcelable { } /** * 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. Loading Loading @@ -212,14 +212,14 @@ public final class KeychainProtectionParameter implements Parcelable { /** * 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; } Loading Loading @@ -249,14 +249,14 @@ public final class KeychainProtectionParameter implements Parcelable { 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]; } }; Loading @@ -274,7 +274,7 @@ public final class KeychainProtectionParameter implements Parcelable { /** * @hide */ protected KeychainProtectionParameter(Parcel in) { protected KeychainProtectionParams(Parcel in) { mUserSecretType = in.readInt(); mLockScreenUiFormat = in.readInt(); mKeyDerivationParams = in.readTypedObject(KeyDerivationParams.CREATOR); Loading
core/java/android/security/keystore/KeychainSnapshot.java +5 −5 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ import java.util.List; */ public final class KeychainSnapshot implements Parcelable { private int mSnapshotVersion; private List<KeychainProtectionParameter> mKeychainProtectionParams; private List<KeychainProtectionParams> mKeychainProtectionParams; private List<WrappedApplicationKey> mEntryRecoveryData; private byte[] mEncryptedRecoveryKeyBlob; Loading @@ -54,7 +54,7 @@ public final class KeychainSnapshot implements Parcelable { */ public KeychainSnapshot( int snapshotVersion, @NonNull List<KeychainProtectionParameter> keychainProtectionParams, @NonNull List<KeychainProtectionParams> keychainProtectionParams, @NonNull List<WrappedApplicationKey> wrappedApplicationKeys, @NonNull byte[] encryptedRecoveryKeyBlob) { mSnapshotVersion = snapshotVersion; Loading @@ -81,7 +81,7 @@ public final class KeychainSnapshot implements Parcelable { /** * 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; } Loading Loading @@ -135,7 +135,7 @@ public final class KeychainSnapshot implements Parcelable { * @return This builder. */ public Builder setKeychainProtectionParams( @NonNull List<KeychainProtectionParameter> recoveryMetadata) { @NonNull List<KeychainProtectionParams> recoveryMetadata) { mInstance.mKeychainProtectionParams = recoveryMetadata; return this; } Loading Loading @@ -195,7 +195,7 @@ public final class KeychainSnapshot implements Parcelable { */ 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); } Loading
core/java/android/security/keystore/RecoveryManager.java +8 −8 Original line number Diff line number Diff line Loading @@ -286,13 +286,13 @@ public class RecoveryManager { * 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); Loading @@ -312,7 +312,7 @@ public class RecoveryManager { * @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(); Loading @@ -333,7 +333,7 @@ public class RecoveryManager { * service. */ @NonNull public @KeychainProtectionParameter.UserSecretType int[] getPendingRecoverySecretTypes() public @KeychainProtectionParams.UserSecretType int[] getPendingRecoverySecretTypes() throws InternalRecoveryServiceException { try { return mBinder.getPendingRecoverySecretTypes(); Loading @@ -347,7 +347,7 @@ public class RecoveryManager { /** * 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 Loading @@ -355,7 +355,7 @@ public class RecoveryManager { * @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); Loading Loading @@ -393,7 +393,7 @@ public class RecoveryManager { @NonNull byte[] verifierPublicKey, @NonNull byte[] vaultParams, @NonNull byte[] vaultChallenge, @NonNull List<KeychainProtectionParameter> secrets) @NonNull List<KeychainProtectionParams> secrets) throws BadCertificateFormatException, InternalRecoveryServiceException { try { byte[] recoveryClaim = Loading
core/java/com/android/internal/widget/ILockSettings.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import android.app.trust.IStrongAuthTracker; 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; Loading Loading @@ -75,10 +75,10 @@ interface ILockSettings { 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); }