KeyStoreWrapper

open class KeyStoreWrapper

This class provides utilities to interact with the Android KeyStore. For more information on the KeyStore, see KeyStore.

Author

bhariharan

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun deleteKey(name: String)
Delete key if it exists
Link copied to clipboard
Generates an EC keypair of length 256, and returns the private key.
Link copied to clipboard
Generates an EC keypair of length 256, and returns the public key.
Link copied to clipboard
Generates an EC keypair of length 256, and returns the encoded public key string.
Link copied to clipboard
Returns an instance of this class, after initializing the KeyStore if required.
Link copied to clipboard
Generates an RSA keypair and returns the private key of length 2048.
open fun getRSAPrivateKey(name: String, length: Int): PrivateKey
Generates an RSA keypair and returns the private key.
Link copied to clipboard
Generates an RSA keypair and returns the public key of length 2048.
open fun getRSAPublicKey(name: String, length: Int): PublicKey
Generates an RSA keypair and returns the public key.
Link copied to clipboard
Generates an RSA keypair and returns the encoded public key string of length 2048.
open fun getRSAPublicString(name: String, length: Int): String
Generates an RSA keypair and returns the encoded public key string.
Link copied to clipboard
Checks if the RSA key supports OAEP encryption padding.