Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 671 Bytes

README.md

File metadata and controls

39 lines (30 loc) · 671 Bytes

@arispati/src-crypto

SRC Crypto Library for node.js

How to Install

  • Install with npm
npm install @arispati/src-crypto

How to Use

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"

Tests

  • Install the dev dependencies
npm install
  • Run the test command
npm test