generate
abstract fun generate(alias: String, spec: HardwareKeySpec = HardwareKeySpec()): HardwareKeyInfo(source)
Generates a new key under alias, replacing any existing key with that alias.
Return
the new key's public information.
Throws
with reason Unsupported if secure hardware is not available and HardwareKeySpec.allowSoftwareKeys is false, or if the platform has no key backend; with another reason if generation fails.
if alias is blank or contains NUL, CR, or LF.