Welcome to the documentation for video-encryptor, a powerful Node.js library for video encryption and decryption using AES encryption. This library simplifies the process of securing video content and can be used in a variety of applications, including content protection, secure video sharing, and more.
- Features
- Installation
- Getting Started
- Encrypting a Video
- Decrypting an Encrypted Video
- File Extensions
- Error Handling
- Dependencies
- Contributing
- License
- Author
- Contact
- Encrypt Video Files: Encrypt video files with a provided encryption key.
- Decrypt Video Files: Decrypt encrypted video files with the same encryption key.
- File Extension Handling: Automatically handle file extensions for output files.
- Error Handling: Built-in error handling for common scenarios.
- Lightweight: A lightweight and easy-to-use API.
You can quickly integrate video-encryptor into your Node.js project using npm:
npm install video-encryptor
To use video-encryptor, you need to import it into your Node.js project:
const VideoEncryptor = require("video-encryptor");
const videoEncryptor = new VideoEncryptor();
To encrypt a video, you'll need the path to the video file, an encryption key, and the desired output file path. Here's how to use the library to encrypt a video:
const videoPath = "./demo.mp4";
const encryptionKey = "your-secret-key";
const encryptedFilePath = "encrypted-video";
videoEncryptor.encryptVideo(videoPath, encryptionKey, encryptedFilePath);
To decrypt an encrypted video, you'll need the path to the encrypted video file, the encryption key used for encryption, and the desired output file path. Here's how to use the library to decrypt an encrypted video:
const encryptedFilePath = "encrypted-video";
const encryptionKey = "your-secret-key";
const decryptedVideoPath = "decrypted-video";
videoEncryptor.decryptVideo(
encryptedFilePath,
encryptionKey,
decryptedVideoPath
);
- If the provided
outputPath
for encryption doesn't include an extension, it will default to.encrypted
. - If the provided
outputPath
for decryption doesn't include an extension, it will default to.mp4
.
The library includes robust error handling for various scenarios, such as invalid file paths, corrupted encrypted files, and existing output files. You can trust video-encryptor to handle unexpected situations gracefully.
- crypto-js: A dependable library for AES encryption.
We welcome contributions from the community! Whether it's bug fixes, new features, or improvements to the documentation, your contributions are valuable. Please feel free to open issues or submit pull requests.
video-encryptor is open-source software licensed under the ISC License. Feel free to use it in your projects.
Abhishek Chamoli (GitHub)
For any questions, suggestions, or inquiries, you can reach out to me at abhishekchamoli007@gmail.com.
Thank you for using video-encryptor. We hope this library simplifies your video encryption needs and enhances the security of your video content.
Please replace [GitHub]https://github.com/AbhishekChamoliDeveloper
with your actual GitHub profile URL and abhishekchamoli007@gmail.com
with your contact email address. This comprehensive documentation provides detailed information on features, installation, usage, error handling, contributions, and licensing for your library.