nerbit-encryptor
v1.1.0
Published
A utility library for encryption and decryption using AES-256-CBC.
Downloads
7
Readme
About The Project
A utility library for encryption and decryption using AES-256-CBC made with nestjs.
Getting Started
Prerequisites
Ensure you have the following prerequisites installed:
- Node.js: Version 14.21.3 or later
You can download and install Node.js from the official website.
Installation
To install the library, you can use npm, yarn, or pnpm:
Using npm
npm i --save nerbit-encryptor
Using yarn
yarn add nerbit-encryptor
Using pnpm
pnpm add nerbit-encryptor
Usage
import { EncryptorService } from 'nerbit-encryptor';
const secretKey = '12345678901234567890123456789012'; // 32 bytes key for AES-256
const service = new EncryptorService();
const plainText = 'Hello, World!';
const encryptedText = service.encrypt(plainText, secretKey);
console.log('Encrypted:', encryptedText);
const decryptedText = service.decrypt(encryptedText, secretKey);
console.log('Decrypted:', decryptedText);
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Email: [email protected]