UNPKG

advanced-cipher

Version:

A sophisticated 256-bit encryption library with multi-layer key derivation and complex bit-level transformations

60 lines (39 loc) 1.32 kB
# Advanced Cipher ## Overview `advanced-cipher` is a sophisticated encryption library providing robust, multi-layer encryption with advanced key derivation techniques. ## Features - 256-bit encryption strength - Multi-stage key derivation - Complex bit-level transformations - Secure encryption and decryption ## Installation ```bash npm install advanced-cipher ``` ## Usage ```javascript import AdvancedCipher from 'advanced-cipher'; // Create cipher instance with a secret key const cipher = new AdvancedCipher('YourSecretKey123!@#'); // Encrypt message const encrypted = cipher.encrypt('Hello, Secure World!'); // Decrypt message const decrypted = cipher.decrypt(encrypted); ``` ## Security Details - **Bit Level**: 256-bit - **Key Derivation**: PBKDF2-inspired multi-iteration transformation - **Encryption Layers**: 1. XOR-based encryption 2. Bit rotation 3. Iteration-dependent obfuscation ## API ### `new AdvancedCipher(secretKey, [iterations])` - `secretKey` (required): A string of at least 12 characters - `iterations` (optional): Number of key derivation iterations (default: 10000) ### `encrypt(plaintext)` Encrypts the input text and returns a Base64 encoded string. ### `decrypt(ciphertext)` Decrypts the Base64 encoded ciphertext and returns the original plaintext. ## License MIT