You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* An observable that emits the master key for the user.
32
+
* @deprecated Interacting with the master-key directly is deprecated. Please use {@link makeMasterPasswordUnlockData}, {@link makeMasterPasswordAuthenticationData} or {@link unwrapUserKeyFromMasterPasswordUnlockData} instead.
* Decrypts the user key with the provided master key
52
+
* @deprecated Interacting with the master-key directly is deprecated. Please use {@link unwrapUserKeyFromMasterPasswordUnlockData} instead.
35
53
* @param masterKey The user's master key
36
54
* * @param userId The desired user
37
55
* @param userKey The user's encrypted symmetric key
@@ -44,33 +62,76 @@ export abstract class MasterPasswordServiceAbstraction {
44
62
userId: string,
45
63
userKey?: EncString,
46
64
)=>Promise<UserKey|null>;
65
+
66
+
/**
67
+
* Makes the authentication hash for authenticating to the server with the master password.
68
+
* @param password The master password.
69
+
* @param kdf The KDF configuration.
70
+
* @param salt The master password salt to use. See {@link saltForUser$} for current salt.
71
+
* @throws If password, KDF or salt are null or undefined.
72
+
*/
73
+
abstractmakeMasterPasswordAuthenticationData: (
74
+
password: string,
75
+
kdf: KdfConfig,
76
+
salt: MasterPasswordSalt,
77
+
)=>Promise<MasterPasswordAuthenticationData>;
78
+
79
+
/**
80
+
* Creates a MasterPasswordUnlockData bundle that encrypts the user-key with a key derived from the password. The
81
+
* bundle also contains the KDF settings and salt used to derive the key, which are required to decrypt the user-key later.
82
+
* @param password The master password.
83
+
* @param kdf The KDF configuration.
84
+
* @param salt The master password salt to use. See {@link saltForUser$} for current salt.
85
+
* @param userKey The user's userKey to encrypt.
86
+
* @throws If password, KDF, salt, or userKey are null or undefined.
87
+
*/
88
+
abstractmakeMasterPasswordUnlockData: (
89
+
password: string,
90
+
kdf: KdfConfig,
91
+
salt: MasterPasswordSalt,
92
+
userKey: UserKey,
93
+
)=>Promise<MasterPasswordUnlockData>;
94
+
95
+
/**
96
+
* Unwraps a user-key that was wrapped with a password provided KDF settings. The same KDF settings and salt must be provided to unwrap the user-key, otherwise it will fail to decrypt.
97
+
* @throws If the encryption type is not supported.
98
+
* @throws If the password, KDF, or salt don't match the original wrapping parameters.
0 commit comments