|
1 | | -# kryptera |
| 1 | +# Kryptera |
2 | 2 |
|
3 | | -Kryptera is a quick-and-dirty .NET Core Tool to encrypt and decrypt files using AEAD AES-256-GCM, as well as an encryption key generator. Kryptera means "encrypt" in Swedish. |
| 3 | +[](https://www.nuget.org/packages/Kryptera) |
| 4 | +[](https://www.nuget.org/packages/Kryptera.Tools) |
| 5 | +[](https://codecov.io/gh/gowon/kryptera) |
| 6 | + |
| 7 | +Kryptera is a .NET Core Tool to quickly encrypt and decrypt files using AEAD AES-256-GCM algorithm from [CryptHash.NET](https://github.com/alecgn/crypthash-net/), as well as an encryption key generator. Kryptera means "encrypt" in [Swedish](https://translate.google.com/?sl=sv&tl=en&text=kryptera&op=translate). |
| 8 | + |
| 9 | +## Install |
| 10 | + |
| 11 | +|Package|Stable|Preview| |
| 12 | +|-|-|-| |
| 13 | +|Kryptera|[](https://www.nuget.org/packages/Kryptera)|[](https://f.feedz.io/gowon/pre-release/packages/Kryptera/latest/download)| |
| 14 | +|Kryptera.Tools|[](https://www.nuget.org/packages/Kryptera.Tools)|[](https://f.feedz.io/gowon/pre-release/packages/Kryptera.Tools/latest/download)| |
| 15 | + |
| 16 | +The Kryptera library can be obtained by either locally cloning this git repository and building it or via NuGet/Feedz: |
| 17 | + |
| 18 | +```shell |
| 19 | +Install-Package Kryptera |
| 20 | +``` |
| 21 | + |
| 22 | +or |
| 23 | + |
| 24 | +```shell |
| 25 | +dotnet add package Kryptera |
| 26 | +``` |
| 27 | + |
| 28 | +The command-line tool for encrypting and decrypting files can be installed through the `dotnet` CLI: |
| 29 | + |
| 30 | +```shell |
| 31 | +dotnet install --global Kryptera.Tools |
| 32 | +``` |
| 33 | + |
| 34 | +after which it is available for use in your shell as `kryptera`. |
4 | 35 |
|
5 | 36 | ## Usage |
6 | 37 |
|
| 38 | +You can use the `--help` option to get detailed information about the commands. |
| 39 | + |
| 40 | +```shell |
| 41 | +kryptera |
| 42 | + |
| 43 | +Usage: |
| 44 | + kryptera [options] [command] |
| 45 | + |
| 46 | +Options: |
| 47 | + -v, --verbosity <Critical|Debug|Error|Information|None|Trace|Warning> Set output verbosity |
| 48 | + --version Show version information |
| 49 | + -?, -h, --help Show help and usage information |
| 50 | + |
| 51 | +Commands: |
| 52 | + encrypt <source> Encrypt a file or directory using AES-256-GCM |
| 53 | + decrypt <source> Decrypt a file or directory using AES-256-GCM |
| 54 | + generate Generate a new AES-256 key |
| 55 | +``` |
| 56 | + |
| 57 | +### Create an encryption key |
| 58 | + |
| 59 | +You can create a new encryption key using the following command: |
| 60 | + |
| 61 | +```shell |
| 62 | +> kryptera generate |
| 63 | +tRKvyxIcQA6jV0eUoH/LA1QFlDSNUQRfzDJqU9CSvzM= |
| 64 | +``` |
| 65 | + |
| 66 | +The output is sent directly to the console, and can be piped directly as input into other applications or scripts. |
| 67 | + |
| 68 | +### Encrypt a file or directory |
| 69 | + |
| 70 | +You can encrypt a file or directory using the following command: |
| 71 | + |
| 72 | +```shell |
| 73 | +kryptera encrypt --key <KEY> <SOURCE> |
| 74 | +``` |
| 75 | + |
| 76 | +The filenames for the encrypted files will have `.aes` appended to them to make them easy to distinguish from the original files. |
| 77 | + |
| 78 | +### Decrypt a file of directory |
| 79 | + |
| 80 | +You can decrypt a file or directory using the following command: |
| 81 | + |
| 82 | +```shell |
| 83 | +kryptera decrypt --key <KEY> <SOURCE> |
| 84 | +``` |
| 85 | + |
| 86 | +If the encrypted files have `.aes` extensions, then the filenames for the decrypted files with have this extension removed. If the encrypted file extensions are not `.aes`, then the filenames of the decrypted files with have `-decrypted` appended to the name right before the extension. |
| 87 | + |
7 | 88 | ## License |
8 | 89 |
|
9 | | -MIT |
| 90 | +MIT |
0 commit comments