FolderCryptor is a PowerShell-based tool for encrypting and decrypting folder contents. It supports multi-layer encryption, allowing users to apply multiple levels of encryption to a file and decrypt in reverse order. This tool uses AES-256 encryption to ensure data security, making it ideal for sensitive information storage.
- AES-256 Encryption: Ensures robust security using a password-based AES key.
- Multi-layer Encryption: Supports multiple encryption layers, allowing flexibility in file security.
- Simple Interface: Easy-to-use script with straightforward prompts for encryption and decryption.
- Filename Modification: Automatically manages
.encextensions to reflect encryption level.
- PowerShell 5.1 or newer
- Windows OS (tested on Windows 10 and 11)
- Clone the repository:
git clone https://github.com/2171001/FolderCryptor.git
- Navigate to the project directory:
cd FolderCryptor
- Open PowerShell and navigate to the directory containing the script:
cd path\to\FolderCryptor
- Run the script:
.\FolderCryptor.ps1
- Enter Password: Provide a password that will be used for both encryption and decryption.
- Choose an Action:
- Type 1 to encrypt the folder contents.
- Type 2 to decrypt the folder contents.
First-time Encryption
When running the script for the first time and selecting encryption:
file.txt → file.txt.enc
Multi-layer Encryption
Running the script and selecting encryption again:
file.txt.enc → file.txt.enc.enc
Decryption Steps
Each decryption removes one .enc layer until the file is restored:
file.txt.enc.enc → file.txt.encfile.txt.enc → file.txt
- The encryption key is derived from the provided password using SHA-256 hashing.
- Make sure to use the same password for encryption and decryption to avoid errors.
- Avoid re-encrypting decrypted files without a backup, as decryption with an incorrect password will fail.
- Invalid Key Size: Ensure your PowerShell environment supports AES-256.
- Padding Error: If you see a "Padding is invalid" error, the password may not match the one used for encryption.
- Contributions are welcome! Feel free to open an issue or submit a pull request with improvements, bug fixes, or new features.