SealdSSKSPasswordPlugin
class SealdSSKSPasswordPlugin(ssksURL: String = "https://ssks.seald.io/", appId: String, maxParallelRequests: Int = 10, instanceName: String = "SealdSSKSPasswordPlugin", logLevel: Byte = 0, logNoColor: Boolean = true)
The SealdSSKSPassword class allows to use the SSKS key storage service to store Seald identities easily and securely, encrypted by a user password.
Parameters
| ssksURL | The SSKS server for this instance to use. This value is given on your Seald dashboard. |
| appId | The ID given by the Seald server to your app. This value is given on your Seald dashboard. |
| maxParallelRequests | Maximum number of concurrent network requests allowed for this instance. Defaults to 10. Set to a negative value to disable the limit entirely. |
| instanceName | An arbitrary name to give to this Seald instance. Can be useful for debugging when multiple instances are running in parallel, as it is added to logs. |
| logLevel | The minimum level of logs you want. All logs of this level or above will be displayed. -1: Trace; 0: Debug; 1: Info; 2: Warn; 3: Error; 4: Fatal; 5: Panic; 6: NoLevel; 7: Disabled. |
| logNoColor | Should be set to false if you want to enable colors in the log output. Defaults to true. |
Constructors
| SealdSSKSPasswordPlugin | constructor(ssksURL: String = "https://ssks.seald.io/", appId: String, maxParallelRequests: Int = 10, instanceName: String = "SealdSSKSPasswordPlugin", logLevel: Byte = 0, logNoColor: Boolean = true) |
Functions
| Name | Summary |
|---|---|
| changeIdentityPassword | fun changeIdentityPassword(userId: String, currentPassword: String, newPassword: String): String Change the password use to encrypt the identity for the userId. |
| changeIdentityPasswordAsync | suspend fun changeIdentityPasswordAsync(userId: String, currentPassword: String, newPassword: String): String Change the password use to encrypt the identity for the userId. |
| retrieveIdentityFromPassword | fun retrieveIdentityFromPassword(userId: String, password: String): ByteArray Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password. |
| retrieveIdentityFromPasswordAsync | suspend fun retrieveIdentityFromPasswordAsync(userId: String, password: String): ByteArray Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given password. |
| retrieveIdentityFromRawKeys | fun retrieveIdentityFromRawKeys(userId: String, rawStorageKey: String, rawEncryptionKey: ByteArray): ByteArray Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given raw keys. |
| retrieveIdentityFromRawKeysAsync | suspend fun retrieveIdentityFromRawKeysAsync(userId: String, rawStorageKey: String, rawEncryptionKey: ByteArray): ByteArray Retrieve the identity stored on the SSKS server for the given userId, and decrypt it with the given raw keys. |
| saveIdentityFromPassword | fun saveIdentityFromPassword(userId: String, password: String, identity: ByteArray): String Save the given identity for the given userId, encrypted with the given password. |
| saveIdentityFromPasswordAsync | suspend fun saveIdentityFromPasswordAsync(userId: String, password: String, identity: ByteArray): String Save the given identity for the given userId, encrypted with the given password. |
| saveIdentityFromRawKeys | fun saveIdentityFromRawKeys(userId: String, rawStorageKey: String, rawEncryptionKey: ByteArray, identity: ByteArray): String Save the given identity for the given userId, encrypted with the given raw keys. |
| saveIdentityFromRawKeysAsync | suspend fun saveIdentityFromRawKeysAsync(userId: String, rawStorageKey: String, rawEncryptionKey: ByteArray, identity: ByteArray): String Save the given identity for the given userId, encrypted with the given raw keys. |