renewKeysAsync
suspend fun renewKeysAsync(preparedRenewal: ByteArray? = null, privateKeys: PreGeneratedKeys? = null, expireAfter: Duration = Duration.ofDays(365 * 5))
Renew the keys of the current device, extending their validity. If the current device has expired, you will need to call renewKeys before you are able to do anything else. Warning: if the identity of the current device is stored externally, for example on SSKS, you will want to re-export it and store it again, otherwise the previously stored identity will not be recognized anymore.
Parameters
preparedRenewal | Optional. The preparedRenewal generated by calling SealdSDK.prepareRenew. If preparedRenewal is given, privateKeys will be ignored. |
privateKeys | Optional. Pre-generated private keys, returned by a call to generatePrivateKeys or generatePrivateKeysAsync. |
expireAfter | The duration during which the renewed device key will be valid without further renewal. Optional, defaults to 5 years. |
Throws
SealdException |