2.0.1 • Published 2 years ago

dec-enc-lib v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

dec-enc-lib

Node.js dec-enc-lib library

  • Pure JavaScript
  • Encryption and decryption string
  • Encryption and decryption object
  • Provides additional encryption with a user-entered password .

Installing

npm i dec-enc-lib

Testing

npm test

Work environment

This library developed and tested primary for Node.js

licens

MIT

Usage

Decryption and Encryption string

Example

// For string
import { Encrypt} from 'dec-enc-lib/src/Encryption.js'
import {Decrypt} from 'dec-enc-lib/src/Decryption.js'

const text = 'Hello there!';
const encryptedMessage = Encrypt(text);
console.log('encrypted: ', encrypted);
const decryptedMessage = Decrypt(encryptedMessage);
console.log('decrypted: ', decryptedMessage);

Decryption and Encryption object

Example

// For object
import {EncryptObj,DecryptObj} from 'dec-enc-lib/src/ObjectEncDec.js'

const object = { name :'manar' , age : 34 , children :['jory','horeya','shams']};
const encrypted = EncryptObj(object);
console.log('encrypted: ', encrypted);
const decrypted = DecryptObj(encrypted);
console.log('decrypted: ', decrypted);

Extra Decryption and Encryption for string with password

Example

// With password
import {EncryptWithPass,DecryptWithPass} from 'dec-enc-lib/src/PassEncDec.js'

const message = ' my name is Manar Alibrahim';
const password = 'key88';
const encrypted = EncryptWithPass(message,password);
console.log('encrypted: ', encrypted);
const decrypted = DecryptWithPass(encrypted, password);
console.log('decrypted: ', decrypted);

Keywords

Decryption- Encryption - password - object

1.0.9

2 years ago

1.0.10

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago