@@ -90,7 +90,7 @@ export const encryptAndStoreEmail = async (
9090 esDB : MailDB ,
9191) : Promise < void > => {
9292 try {
93- const aux = getAux ( newEmailToStore . params ) ;
93+ const aux = getAux ( newEmailToStore . params , false ) ;
9494 const enc = await encryptEmailContentSymmetricallyWithKey ( newEmailToStore . body , indexKey , aux , newEmailToStore . id ) ;
9595 const encryptedEmail : StoredEmail = { enc, params : newEmailToStore . params , id : newEmailToStore . id } ;
9696 await esDB . put ( DB_LABEL , encryptedEmail ) ;
@@ -114,7 +114,7 @@ export const encryptAndStoreManyEmail = async (
114114 try {
115115 const encryptedEmails = await Promise . all (
116116 newEmailsToStore . map ( async ( email : Email ) => {
117- const aux = getAux ( email . params ) ;
117+ const aux = getAux ( email . params , false ) ;
118118 const enc = await encryptEmailContentSymmetricallyWithKey ( email . body , indexKey , aux , email . id ) ;
119119
120120 return { enc, params : email . params , id : email . id } ;
@@ -137,7 +137,7 @@ export const encryptAndStoreManyEmail = async (
137137 */
138138const decryptEmail = async ( indexKey : CryptoKey , encryptedEmail : StoredEmail ) : Promise < Email > => {
139139 try {
140- const aux = getAux ( encryptedEmail . params ) ;
140+ const aux = getAux ( encryptedEmail . params , false ) ;
141141 const email = await decryptEmailSymmetrically ( indexKey , aux , encryptedEmail . enc ) ;
142142 return { body : email , params : encryptedEmail . params , id : encryptedEmail . id } ;
143143 } catch ( error ) {
@@ -178,7 +178,7 @@ export const getAndDecryptAllEmails = async (indexKey: CryptoKey, esDB: MailDB):
178178
179179 const decryptedEmails = await Promise . all (
180180 encryptedEmails . map ( async ( encEmail ) => {
181- const aux = getAux ( encEmail . params ) ;
181+ const aux = getAux ( encEmail . params , false ) ;
182182 const body = await decryptEmailSymmetrically ( indexKey , aux , encEmail . enc ) ;
183183 return { body, params : encEmail . params , id : encEmail . id } ;
184184 } ) ,
0 commit comments