delete notes & sync to firebase

This commit is contained in:
2023-05-25 22:29:40 +02:00
parent 5a4bba2dcd
commit f6e5d5ca4f
10 changed files with 64 additions and 66 deletions

View File

@@ -13,3 +13,7 @@ export const decrypt = (encryptedMessage: string, key: string): string => {
throw new Error("Message doesn't have valid encryption")
return decryptedMessage.substring(encryptionPrefix.length)
}
export const encrypt = (unencryptedMessage: string, key: string): string => {
return CryptoJS.AES.encrypt(encryptionPrefix + unencryptedMessage, key).toString()
}