Are you getting the following error message when trying to encrypt or decrypt a Smoke memo in ElectronJS or React Native using smoke-js? Perhaps looking for something that works for your framework that you're using when building your cutting-edge Smoke DApp?
Adapted from this pull request on dhive that was never merged into
How to use?
Hivecrypt can be installed from
npm with the following command:
npm i hivecrypt
It can also be imported into the browser by including the following script tag in your HTML file, where Hivecrypt will be available through
Once installed, it may be used for encrypting and decrypting memos just like how it is done with smoke-js, but works in more environments.
const hivecrypt = require('hivecrypt') // CommonJS let encrypted = hivecrypt.encode('privatekey1','publickey2','#somesecretmessage') let decrypted = hivecrypt.decode('privatekey2',encrypted) console.log(encrypted,decrypted)
It might not be built with optimizing for the smallest package size in mind, but at least it is something that is usable for devs. And yes, it was originally written for Hive but this works for any 3 character public key prefixes.