3.0.0 • Published 8 months ago

video-encryptor v3.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

video-encryptor Documentation

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.

Table of Contents

  1. Features
  2. Installation
  3. Getting Started
  4. Encrypting a Video
  5. Decrypting an Encrypted Video
  6. File Extensions
  7. Error Handling
  8. Dependencies
  9. Contributing
  10. License
  11. Author
  12. Contact

Features

  • 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.

Installation

You can quickly integrate video-encryptor into your Node.js project using npm:

npm install video-encryptor

Getting Started

Importing the Library

To use video-encryptor, you need to import it into your Node.js project:

const VideoEncryptor  = require("video-encryptor");
const videoEncryptor = new VideoEncryptor();

Encrypting a Video

Usage

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);

Decrypting an Encrypted Video

Usage

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
);

File Extensions

  • 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.

Error Handling

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.

Dependencies

  • crypto-js: A dependable library for AES encryption.

Contributing

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.

License

video-encryptor is open-source software licensed under the ISC License. Feel free to use it in your projects.

Author

Abhishek Chamoli (GitHub)

Contact

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.

3.0.0

8 months ago

2.0.0

8 months ago

1.0.0

8 months ago