delete notes & sync to firebase
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user