This C# CLI provides functionality for encrypting and decrypting files locally and interacting with Cloudflare R2 Storage Bucket.
- Local file encryption and decryption
- Download files from R2 storage
- Upload files to R2 storage
- Encrypt and decrypt downloaded files
- Progress tracking for file uploads and downloads
- .NET Core SDK (version compatible with the program)
- DotNetEnv package for environment variable management
- Active R2 storage account and API access
- Clone the repository or download the source code.
- Create Worker based on R2 Example with API Secret for authentication.
- Create a
.env
file in the project root with the following variables:R2API_URL=your_r2_api_url API_SECRET=your_api_secret
- Install required packages:
dotnet add package DotNetEnv
Run the program using:
dotnet run
Follow the on-screen prompts to:
- Choose operation mode: (F)etch, (P)ut, or (L)ocal
- Provide file paths or names as requested
- Select encryption or decryption operations
- Enter encryption/decryption passwords when prompted
- Fetch (F): Download a file from R2 storage
- Put (P): Upload a local file to R2 storage
- Local (L): Perform encryption/decryption on local files