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()
}

View File

@@ -14,6 +14,7 @@ Let's get started!`,
{
title: 'brackets',
content: `If you type square brackets around text a link is created automatically. Like magic!`,
isRoot: false
},
].map((note) => ({
id: shortid.generate(),