# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# KeyStoreParameter.Builder

`public static final class KeyStoreParameter.Builder`
`extends Object` ``

java.lang.Object
↳ | android.security.KeyStoreParameter.Builder

This class is deprecated.
Use `KeyProtection.Builder` instead.

Builder class for `KeyStoreParameter` objects.

This will build protection parameters for use with the Android KeyStore facility.

This can be used to require that KeyStore entries be stored encrypted.

Example:

     KeyStoreParameter params = new KeyStoreParameter.Builder(mContext)
             .setEncryptionRequired()
             .build();

## Summary

### Public constructors
`Builder(Context context)` Creates a new instance of the `Builder` with the given `context`.

### Public methods
`KeyStoreParameter` | `build()` Builds the instance of the `KeyStoreParameter`.
`KeyStoreParameter.Builder` | `setEncryptionRequired(boolean required)` This method is deprecated. Data at rest encryption is enabled by default. If extra binding to the lockscreen credential is desired, use `.Builder#setUserAuthenticationRequired(boolean)`. This flag will be ignored from Android S.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### Builder

    public Builder (Context context)

Creates a new instance of the `Builder` with the given `context`. The `context` passed in may be used to pop up some UI to ask the user to unlock or initialize the Android KeyStore facility.

Parameters
`context` | `Context`: This value cannot be `null`.

## Public methods

### build

    public KeyStoreParameter build ()

Builds the instance of the `KeyStoreParameter`.

Returns
`KeyStoreParameter` | built instance of `KeyStoreParameter` This value cannot be `null`.

Throws
`IllegalArgumentException` | if a required field is missing

### setEncryptionRequired

    public KeyStoreParameter.Builder setEncryptionRequired (boolean required)

This method is deprecated.
Data at rest encryption is enabled by default. If extra binding to the lockscreen credential is desired, use `.Builder#setUserAuthenticationRequired(boolean)`. This flag will be ignored from Android S.

Sets whether this `KeyStore` entry must be encrypted at rest. Encryption at rest will protect the entry with the secure lock screen credential (e.g., password, PIN, or pattern).

Note that enabling this feature requires that the secure lock screen (e.g., password, PIN, pattern) is set up, otherwise setting the `KeyStore` entry will fail. Moreover, this entry will be deleted when the secure lock screen is disabled or reset (e.g., by the user or a Device Administrator). Finally, this entry cannot be used until the user unlocks the secure lock screen after boot.

Parameters
`required` | `boolean`

Returns
`KeyStoreParameter.Builder` | This value cannot be `null`.

See also:

- `KeyguardManager.isDeviceSecure()`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*