1.1.0 • Published 10 years ago

ez-crypt v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

Installation

npm install ez-crypt

A simple example

ezcrypt = require('ez-crypt');

var crypt = new ezcrypt.Crypt(),
    string = 'Hello, world!',
    encrypted = crypt.encrypt(string),
    decrypted = crypt.decrypt(encrypted);
    
console.log('String to encrypt: ' + string);
console.log('Key: ' + crypt.key_str);
console.log('IV: ' + crypt.iv_str);
console.log('Encrypted string: ' + encrypted);
console.log('Decrypted string: ' + decrypted);

The Crypt class variables

VariableDescriptionRequirementsDefault
keyThey encryption/decryption keyA string containing 32 random hex numbers32 random hex numbers
ivThe initialization vectiorA string containing 32 random hex numbers32 random hex numbers
modeThe cryptographic methodModes from the crypto-js packagemode.CFB
paddingThe method used for paddingPadding types from the crypto-js packagepad.Pkcs7
1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago