https://github.com/anuuragg/aes-in-node.js
Implementing the Advanced Encryption Standard (AES) in Node.js using the Crypto module.
https://github.com/anuuragg/aes-in-node.js
advanced-encryption-standard aes-encryption crypto nodejs
Last synced: 5 months ago
JSON representation
Implementing the Advanced Encryption Standard (AES) in Node.js using the Crypto module.
- Host: GitHub
- URL: https://github.com/anuuragg/aes-in-node.js
- Owner: anuuragg
- Created: 2024-09-08T09:25:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T11:53:40.000Z (almost 2 years ago)
- Last Synced: 2025-07-08T16:54:38.645Z (11 months ago)
- Topics: advanced-encryption-standard, aes-encryption, crypto, nodejs
- Language: JavaScript
- Homepage:
- Size: 2.94 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AES-in-Node.js
This project demonstrates how to implement Advanced Encryption Standard (AES) encryption and decryption in Node.js using the `crypto` module. It allows encrypting and decrypting files, such as images, using AES-256-CBC mode.
## Features
- **AES-256 Encryption**: Uses 256-bit keys for robust encryption.
- **File Encryption & Decryption**: Can encrypt and decrypt files like `.jpg`, `.jpeg`, `.png`, or any other file type.
- **Dynamic Key Generation**: Generates a new random key for each encryption.
## Prerequisites
- **Node.js**
- **npm** (or yarn)
## Setup and Installation
1. Clone the repository:
```bash
git clone https://github.com/anuuragg/AES-in-Node.js.git
cd AES-in-Node.js
```
2. Install the necessary dependencies:
```bash
npm install
```
## Usage
### Encrypt a File
Run the encryption script to encrypt a file. The encrypted file will be stored in the `encrypted_files` folder.
```bash
node src/encryption/encrypt.js
```
### Decrypt a File
Run the decryption script to decrypt an encrypted file. The decrypted file will be stored in the `decrypted_files` folder.
```bash
node src/encryption/decrypt.js
```