1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Convert SecretStorage to TypeScript

This commit is contained in:
David Baker
2021-07-07 19:37:22 +01:00
parent dc90115a1b
commit c34d4e777f
7 changed files with 206 additions and 164 deletions

View File

@@ -16,7 +16,7 @@ limitations under the License.
import { DeviceInfo } from "./deviceinfo";
import { IKeyBackupInfo } from "./keybackup";
import { ISecretStorageKeyInfo } from "../matrix";
import { ISecretStorageKeyInfo } from "./SecretStorage";
// TODO: Merge this with crypto.js once converted
@@ -112,9 +112,17 @@ export interface ISecretStorageKey {
keyInfo: ISecretStorageKeyInfo;
}
export interface IPassphraseInfo {
algorithm: "m.pbkdf2";
iterations: number;
salt: string;
bits: number;
}
export interface IAddSecretStorageKeyOpts {
// depends on algorithm
// TODO: Types
name: string;
passphrase: IPassphraseInfo;
key: Uint8Array;
}
export interface IImportOpts {