1.1.0 • Published 8 years ago

ez-crypt v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 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

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago