MCPcopy Index your code
hub / github.com/DeepNotesApp/DeepNotes / encryptUserEmail

Function encryptUserEmail

packages/@deeplib/data/src/emails.ts:14–28  ·  view source on GitHub ↗
(email: string)

Source from the content-addressed store, hash-verified

12);
13
14export function encryptUserEmail(email: string) {
15 return _userEmailEncryptionKey().encrypt(
16 textToBytes(
17 (process.env.EMAIL_CASE_SENSITIVITY_EXCEPTIONS ?? '')
18 .split(';')
19 .includes(email)
20 ? email
21 : email.toLowerCase(),
22 ),
23 {
24 padding: true,
25 associatedData: { context: 'UserEmail' },
26 },
27 );
28}
29export function decryptUserEmail(encryptedEmail: Uint8Array) {
30 return bytesToText(
31 _userEmailEncryptionKey().decrypt(encryptedEmail, {

Callers 4

email.tsFile · 0.90
registerUserFunction · 0.90
changeEmailStep2Function · 0.90
requestFunction · 0.90

Calls 2

textToBytesFunction · 0.90
encryptMethod · 0.45

Tested by

no test coverage detected