sehrope/node-simple-encryptor

How to use the package with ES6 syntax?

lazy-coder-1 opened this issue · 1 comments

How to use the package with ES6 syntax?

This is an old question, but here is what worked for me:

(import)
import createEncryptor from "simple-encryptor";

(usage)
const encryptor = createEncryptor(key);
const decrypted = encryptor.decrypt(value);