fun generateKey(): Boolean
(source)
Generates the managed key if it does not already exist.
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.