Skip to content


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.

If you use an incorrect password multiple times, the server may throttle your requests. In this case, you will receive an error Request throttled, retry after {N}s, with {N} the number of seconds during which you cannot try again.


The clear identity as ByteArray.


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.