Javascript implementation of Fernet symmetric encryption.
Python fernet cryptography.
-
Paste the elements of https://github.com/DanielFranco-NEUenergy/fernet.js, except yarn files, fernetBrowser.js, and Readme.md
-
yarn init
-
yarn add crypto-js
-
yarn add fernet
-
In case zipurl is installed, remove "type": "module", from package.json of the /nodemodules/zipurl/ folder
-
In fernet.js Change new Buffer(s) to new Buffer.from(s) , so that decode64() be: // convert base64 string to hex string var decode64toHex = function decode64(string) { var s = URLBase64.decode(string.replace(/=+$/, '')); return (new Buffer.from(s)).toString('hex'); }