Skip to content

SealdSSKSPasswordPlugin

class SealdSSKSPasswordPlugin(ssksURL: String = "https://ssks.seald.io/", appId: String, 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

ssksURLThe SSKS server for this instance to use. This value is given on your Seald dashboard.
appIdThe ID given by the Seald server to your app. This value is given on your Seald dashboard.
instanceNameAn 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.
logLevelThe 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.
logNoColorShould be set to false if you want to enable colors in the log output. Defaults to true.

Constructors

SealdSSKSPasswordPluginconstructor(ssksURL: String = "https://ssks.seald.io/", appId: String, instanceName: String = "SealdSSKSPasswordPlugin", logLevel: Byte = 0, logNoColor: Boolean = true)

Functions

NameSummary
changeIdentityPasswordfun changeIdentityPassword(userId: String, currentPassword: String, newPassword: String): String
Change the password use to encrypt the identity for the userId.
changeIdentityPasswordAsyncsuspend fun changeIdentityPasswordAsync(userId: String, currentPassword: String, newPassword: String): String
Change the password use to encrypt the identity for the userId.
retrieveIdentityFromPasswordfun 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.
retrieveIdentityFromPasswordAsyncsuspend 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.
retrieveIdentityFromRawKeysfun 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.
retrieveIdentityFromRawKeysAsyncsuspend 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.
saveIdentityFromPasswordfun saveIdentityFromPassword(userId: String, password: String, identity: ByteArray): String
Save the given identity for the given userId, encrypted with the given password.
saveIdentityFromPasswordAsyncsuspend fun saveIdentityFromPasswordAsync(userId: String, password: String, identity: ByteArray): String
Save the given identity for the given userId, encrypted with the given password.
saveIdentityFromRawKeysfun saveIdentityFromRawKeys(userId: String, rawStorageKey: String, rawEncryptionKey: ByteArray, identity: ByteArray): String
Save the given identity for the given userId, encrypted with the given raw keys.
saveIdentityFromRawKeysAsyncsuspend 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.