Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

crypto-aes-ecb

clarencetw223Apache-2.01.2.0TypeScript support: included

A Encrypt/Decrypt AES ECB library for NodeJS.

typescript, jest, codecov, encrypt, decrypt, encryption, decryption, js, crypto, aes, 128, 192, 256, ecb

readme

node-crypto-ecb

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

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