SRC Crypto Library for node.js
- Install with npm
npm install @arispati/src-crypto
import SrcCrypto from '@arispati/src-crypto'
// Set the secret key
let secretKey = 's3cr3tK3y' // default secret key
// Initilize CryptoAES Class
let crypto = new SrcCrypto(secretKey)
// Encrypt
let encrypt = crypto.encrypt('@arispati/src-crypto')
// di92SjlPSnFab3JhclI2U0Q5K1k3SVFncTV4VTVzdDlkZTNZT09TV21Jcz0=
// Decrypt
let decrypt = crypto.decrypt(encrypt)
// "@arispati/src-crypto"
- Install the dev dependencies
npm install
- Run the test command
npm test