MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / computeGroupPasswordValues

Function computeGroupPasswordValues

apps/client/src/code/crypto.ts:194–208  ·  view source on GitHub ↗
(
  groupId: string,
  groupPassword: string,
)

Source from the content-addressed store, hash-verified

192}
193
194export async function computeGroupPasswordValues(
195 groupId: string,
196 groupPassword: string,
197) {
198 const passwordValues = await derivePasswordValues({
199 password: groupPassword,
200 salt: nanoidToBytes(groupId),
201 });
202
203 return {
204 passwordHash: passwordValues.hash,
205
206 passwordKey: passwordValues.key,
207 };
208}
209
210export async function unlockGroupContentKeyring(
211 groupId: string,

Calls 2

nanoidToBytesFunction · 0.90
derivePasswordValuesFunction · 0.70

Tested by

no test coverage detected