allow customising the source of dehydration key
This commit is contained in:
parent
dbf2394668
commit
625e03cde3
2 changed files with 15 additions and 1 deletions
|
@ -44,6 +44,13 @@ function getSecretStorageKey(): Uint8Array {
|
|||
return null;
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
||||
function getDehydrationKey(
|
||||
keyInfo: ISecretStorageKeyInfo,
|
||||
): Promise<Uint8Array> {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
||||
function catchAccessSecretStorageError(e: Error): void {
|
||||
// E.g. notify the user in some way
|
||||
|
@ -74,6 +81,9 @@ export interface ISecurityCustomisations {
|
|||
setupEncryptionNeeded?: (
|
||||
kind: SetupEncryptionKind,
|
||||
) => boolean,
|
||||
getDehydrationKey?: (
|
||||
keyInfo: ISecretStorageKeyInfo,
|
||||
) => Promise<Uint8Array>,
|
||||
}
|
||||
|
||||
// A real customisation module will define and export one or more of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue