Skip to content

Keychain

Secure storage for credentials.

The keychain is a secure storage for credentials, keys etc. Use the set() method to add values to the keychain. You can then later use the get() method to retrieve the value.

+contains

Check if keychain contains a key.

Checks if the keychain contains the specified key.

static contains(key: string): bool

+set

Add value for a specified key to keychain.

Adds the the value to the keychain, assigning it to the specified key. If the key already exists in the keychain, the value is overwritten.

Values are securely stored in an encrypted database.

static set(key: string, value: string)

+get

Reads a value from the keychain.

Reads the value for the specified key. If the key doesn't exist the method will throw an error. Used the contains method to check if a key exists in the keychain.

static get(key: string): string

+remove

Remove key from keychain.

static remove(key: string)