crypto-aes-ecb
v1.2.0
Published
A Encrypt/Decrypt AES ECB library for NodeJS.
Downloads
70
Maintainers
Readme
node-crypto-ecb
A Encrypt/Decrypt AES ECB library for NodeJS.
Install
npm install crypto-aes-ecb
Usage AES ECB 256
import { Aes256EcbEncrypt, Aes256EcbDecrypt } from 'crypto-aes-ecb';
const message = 'Hello';
const key = 'secretkey16bytessecretkey16bytes'
const encryptMessage = Aes256EcbEncrypt(message, key);
const result = Aes256EcbDecrypt(encryptMessage, key);
console.log(result) // Hello
Usage AES ECB 192
import { Aes192EcbEncrypt, Aes192EcbDecrypt } from 'crypto-aes-ecb';
const message = 'Hello';
const key = 'secretkeysecretkey24byte'
const encryptMessage = Aes192EcbEncrypt(message, key);
const result = Aes192EcbDecrypt(encryptMessage, key);
console.log(result) // Hello
Usage AES ECB 128
import { Aes128EcbEncrypt, Aes128EcbDecrypt } from 'crypto-aes-ecb';
const message = 'Hello';
const key = 'secretkey16bytes'
const encryptMessage = Aes128EcbEncrypt(message, key);
const result = Aes128EcbDecrypt(encryptMessage, key);
console.log(result) // Hello