Skip to content

Commit

Permalink
Add docs for crypto-api.bootstrapSecretStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Jun 16, 2023
1 parent 900745f commit 144c446
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/crypto-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,20 +231,16 @@ export interface CryptoApi {
createRecoveryKeyFromPassphrase(password?: string): Promise<GeneratedSecretStorageKey>;

/**
* Bootstrap the secret storage by creating a new secret storage key and stores it in the secret storage.
*
* @param createSecretStorageKey
* @param keyBackupInfo
* @param setupNewKeyBackup
* @param setupNewSecretStorage
* @param getKeyBackupPassphrase
* - Do nothing if an AES key is already stored in the secret storage;
* - Generate a new key {@link GeneratedSecretStorageKey} with `createSecretStorageKey`.
* - Stored this key in the secret storage and set it as the default key.
* - Call `cryptoCallbacks.cacheSecretStorageKey` if provided.
*
* @param opts - Options object.
*/
bootstrapSecretStorage({
createSecretStorageKey,
keyBackupInfo,
setupNewKeyBackup,
setupNewSecretStorage,
getKeyBackupPassphrase,
}: ICreateSecretStorageOpts): Promise<void>;
bootstrapSecretStorage(opts: ICreateSecretStorageOpts): Promise<void>;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
Expand Down

0 comments on commit 144c446

Please sign in to comment.