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

Function encryptRecoveryCodes

apps/app-server/src/utils/crypto.ts:144–148  ·  view source on GitHub ↗
(userRecoveryCodes: Uint8Array[])

Source from the content-addressed store, hash-verified

142 base64ToBytes(process.env.USER_RECOVERY_CODES_ENCRYPTION_KEY),
143);
144export function encryptRecoveryCodes(userRecoveryCodes: Uint8Array[]) {
145 return _userRecoveryCodesEncryptionKey.encrypt(pack(userRecoveryCodes), {
146 associatedData: { context: 'UserRecoveryCodes' },
147 });
148}
149export function decryptRecoveryCodes(
150 userEncryptedRecoveryCodes: Uint8Array,
151): Uint8Array[] {

Callers 3

generateRecoveryCodesFunction · 0.90
finishFunction · 0.90
_checkTwoFactorAuthFunction · 0.90

Calls 1

encryptMethod · 0.45

Tested by

no test coverage detected