Skip to content

saveIdentityFromRawKeys

fun saveIdentityFromRawKeys(userId: String, rawStorageKey: String, rawEncryptionKey: ByteArray, identity: ByteArray)

Save the given identity for the given userId, encrypted with the given raw keys.

Parameters

userIdThe ID of the userId.
rawStorageKeyThe key under which identity keys are stored. This MUST be a secret known only to this user of your app, and never to other users, as learning it will allow deleting the stored identities. Useful to change if you want to store multiple identities for the same userId. Allowed characters : A-Za-z0-9+/=-_@.. Max length is 256 characters.
rawEncryptionKeyThe raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be a cryptographically random buffer of 64 bytes.
identityThe identity to save.

Throws

SealdException