# Interface: SSKSPassword

# Table of contents

# Properties

# Methods

# Properties

# keyStorageURL

keyStorageURL: string

keyStorageURL with which this plugin instance was created. URL of the SSKS Identity Key Storage to which it should connect.


# keyStore

keyStore: KeyStorePassword

Manual SSKS Identity Key Storage interface. For advanced use.

# Methods

# changeIdentityPassword

changeIdentityPassword(args): Promise<void>

Change the password of a Seald account.

# Parameters

Name Type Description
args Object
args.currentPassword string The user's current password.
args.newPassword string The next password
args.userId string The unique ID of the current user inside your app. It will be used to identify this user.

# Returns

Promise<void>


# retrieveIdentity

retrieveIdentity(args): Promise<{ deviceId: string ; sealdId: string ; userId: string }>

Retrieve the Seald account previously created with initiateIdentity.

You must either pass the password argument, or both rawStorageKey and rawEncryptionKey.

# Parameters

Name Type Description
args Object
args.password? string The user's password. It will be used to encrypt / decrypt the stored identity keys. You must set either the password argument, or both rawStorageKey and rawEncryptionKey.
args.rawEncryptionKey? string The raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be the Base64 string encoding of a cryptographically random buffer of 64 bytes. You must set either the password argument, or both rawStorageKey and rawEncryptionKey.
args.rawStorageKey? string The 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. You must set either the password argument, or both rawStorageKey and rawEncryptionKey.
args.userId string The unique ID of the current user inside your app. It will be used to identify this user.

# Returns

Promise<{ deviceId: string ; sealdId: string ; userId: string }>

}


# saveIdentity

saveIdentity(args): Promise<void>

Save the Seald account to SSKS.

You must either pass the password argument, or both rawStorageKey and rawEncryptionKey.

# Parameters

Name Type Description
args Object
args.identity? Buffer Optional, the identity to save. If no identity is given, current one is saved.
args.password? string The user's password. It will be used to encrypt / decrypt the stored identity keys. You must set either the password argument, or both rawStorageKey and rawEncryptionKey.
args.rawEncryptionKey? string The raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be the Base64 string encoding of a cryptographically random buffer of 64 bytes. You must set either the password argument, or both rawStorageKey and rawEncryptionKey.
args.rawStorageKey? string The 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. You must set either the password argument, or both rawStorageKey and rawEncryptionKey.
args.userId string The unique ID of the current user inside your app. It will be used to identify this user.

# Returns

Promise<void>