From d16c25e759836e299f402b81784b524e99af16df Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Tue, 25 Nov 2025 10:02:51 -0500 Subject: [PATCH] chore(docs) Add comments from contributing docs to master password types in code * Added comments from contributing docs. * Grammatical changes. --- .../master-password/types/master-password.types.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/common/src/key-management/master-password/types/master-password.types.ts b/libs/common/src/key-management/master-password/types/master-password.types.ts index 19c8c49c119..5ba22905140 100644 --- a/libs/common/src/key-management/master-password/types/master-password.types.ts +++ b/libs/common/src/key-management/master-password/types/master-password.types.ts @@ -25,7 +25,10 @@ export type MasterPasswordSalt = Opaque; export type MasterKeyWrappedUserKey = Opaque; /** - * The data required to unlock with the master password. + * Encapsulates the data needed to unlock a vault using a master password. + * It contains the masterKeyWrappedUserKey along with the KDF settings and salt used to derive the master key. + * It is currently backwards compatible to master-key based unlock, but this will not be the case in the future. + * Features relating to master-password-based unlock should use this abstraction. */ export class MasterPasswordUnlockData { constructor( @@ -66,7 +69,9 @@ export class MasterPasswordUnlockData { } /** - * The data required to authenticate with the master password. + * Encapsulates the data required to authenticate using a master password. + * It contains the masterPasswordAuthenticationHash, along with the KDF settings and salt used to derive it. + * The encapsulated abstraction prevents authentication issues resulting from unsynchronized state. */ export type MasterPasswordAuthenticationData = { salt: MasterPasswordSalt;