movocrypt

1.2.6 • Public • Published

movocrypt

Sample & Eazy, Strait forward way to secure important data. Library to help you secure passwords , pincode and important data.

[Build Status]

movocrypt logo

Prerequisites

Download and Install nodejs from here or alternative download nodejs from package manager

Installing

to install movocrypt just run this code

npm install movocrypt

make sure you install latest version of library.

Running and usage

Explain methods in library.

Encrypt

This method use for encrypt your important data.

[dataForEncrypt] data that you need to encrypt data.

[algorithm] algorithms choose one : 'aes128' or 'aes192' or 'aes256'

[secretKey] key for encryption.

[result] encrypted data.

var movocrypt = require('movocrypt');
//dataForEncrypt plain data (number , float , string , json) that you need to encrypt data.
//algorithm choose one 'aes128' or 'aes192' or 'aes256'
// or leave it null to use default algorithm 'aes256'
//secretKey key for encryption.
movocrypt.encrypt(dataForEncrypt ,algorithm , secretKey, function (err, result) {
//if err get this message "Error Happened While Encrypt"
//result example : dfjghdkgsdkfghiawgfaku
    console.log(err || result);
})

Decrypt

This method use for decrypt your important data.

[dataForDecrypt] data that you need to decrypt data.

[algorithm] algorithms choose one : 'aes128' or 'aes192' or 'aes256'

[secretKey] key for encryption.

[result] plain data.

var movocrypt = require('movocrypt');
//dataForDecrypt this is data that you need to decrypt data.
//algorithm choose one 'aes128' or 'aes192' or 'aes256'
// or leave it null to use default algorithm 'aes256'
//secretKey key for encryption.
movocrypt.decrypt(dataForDecrypt ,algorithm, secretKey, function (err, result) {
//if err get this message "Error Happened While Decrypt"
//result example : plain data
    console.log(err || result);
})

Hash

This method use for hash your important data using sha256 algorithm.

[dataForHash] data that you need to hash.

[result] true/false

var movocrypt = require('movocrypt');
//dataForHash is a plain data (number , float , string , json) for hash
movocrypt.genHash(dataForHash , function (result) {
//result is has data example : ghdkfhgseigedyti845tjhsgjksegh
    console.log(result);
})

Compare Hash

This method use for verify and compare your encrypted important data using sha256 algorithm.

[compareHash] data that you need to compare with hash.

[result] true/false

var movocrypt = require('movocrypt');
//plainData is a plain data (number , float , string , json) for hash
//dataHashed hash that you need to compare of verify data
movocrypt.compareHash(plainData, dataHashed , function (result) {
//result is (true or false)
    console.log(result);
})

Package Sidebar

Install

npm i movocrypt

Weekly Downloads

6

Version

1.2.6

License

none

Unpacked Size

6.29 kB

Total Files

3

Last publish

Collaborators

  • movocode