android-components / mozilla.components.lib.dataprotect / Keystore / generateKey

# generateKey

`fun generateKey(): Boolean` (source)

Generates the managed key if it does not already exist.

### Exceptions

`InvalidKeyException` - If a key for labael exists, but is not a SecretKey

`NoSuchAlgorithmException` - If the key cipher algorithm is not supported

Return
`true` if a new key was generated; `false` if the key already exists and can be used.