Package Exports
- hbnext-encrypt-decrypt
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hbnext-encrypt-decrypt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
HB Encryption Module
Description
A simple module to encrypt and decrypt string.
Options
| Name | Default | Description |
|---|---|---|
encryptionKey |
null |
Encryption key |
How to use it
Installation
// First you have to get module and instantiate it
npm i hbnext-encrypt-decrypt
After installing module, add this to your code:
```javascript
const options = {
encryptionKey: 'haikel'
};
const encryption = require('hbnext-encrypt-decrypt')(options);How to encrypt?
const text = "testmodule"
const resultencrypt = encryption.encrypt(text);How to decrypt?
const resultdecrypt = encryption.decrypt(resultencrypt)