# KeyStore.CallbackHandlerProtection

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CallbackHandlerProtection

```
open class CallbackHandlerProtection : KeyStore.ProtectionParameter
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                       ||
| ↳ | [java.security.KeyStore.CallbackHandlerProtection](https://developer.android.com/reference/kotlin/java/security/KeyStore.CallbackHandlerProtection#) |

A ProtectionParameter encapsulating a CallbackHandler.

## Summary

|                                                                                                                                                                                               Public constructors                                                                                                                                                                                                ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [CallbackHandlerProtection](https://developer.android.com/reference/kotlin/java/security/KeyStore.CallbackHandlerProtection#CallbackHandlerProtection(javax.security.auth.callback.CallbackHandler))`(`handler:` `[CallbackHandler](https://developer.android.com/reference/kotlin/javax/security/auth/callback/CallbackHandler.html#)!`)` Constructs a new CallbackHandlerProtection from a CallbackHandler. |

|                                                                                                                                             Public methods                                                                                                                                             ||
|---------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[CallbackHandler](https://developer.android.com/reference/kotlin/javax/security/auth/callback/CallbackHandler.html#)! | [getCallbackHandler](https://developer.android.com/reference/kotlin/java/security/KeyStore.CallbackHandlerProtection#getCallbackHandler())`()` Returns the CallbackHandler. |

## Public constructors

### CallbackHandlerProtection

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
CallbackHandlerProtection(handler: CallbackHandler!)
```

Constructs a new CallbackHandlerProtection from a CallbackHandler.

|                                                                      Parameters                                                                      ||
|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `handler` | [CallbackHandler](https://developer.android.com/reference/kotlin/javax/security/auth/callback/CallbackHandler.html#)!:the CallbackHandler |

|                      Exceptions                      ||
|----------------------------------|--------------------|
| `java.lang.NullPointerException` | if handler is null |

## Public methods

### getCallbackHandler

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getCallbackHandler(): CallbackHandler!
```

Returns the CallbackHandler.

|                                                                   Return                                                                    ||
|-----------------------------------------------------------------------------------------------------------------------|----------------------|
| [CallbackHandler](https://developer.android.com/reference/kotlin/javax/security/auth/callback/CallbackHandler.html#)! | the CallbackHandler. |