Skip to content

About

SecureConfig.Encrypt is a lightweight .NET tool designed to safely encrypt sensitive configuration data inside your appsettings.json

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🐀🔐 SecureConfig.Encrypt

forthebadge forthebadge

A .NET Core Tool to encrypt and decrypt files using AES-256-GCM, as well as generate an encryption key.

The tool was created to help encrypt configuration files for use with the .NET Core projects. SecureConfig.Encrypt can be used as a stand-alone tool to encrypt and decrypt files.

Installation

Download and install the .NET Core 9.0 SDK or newer. Once installed, run the following command to install SecureConfig.Encrypt:

dotnet tool install -g SecureConfig.Encrypt

Usage

Once installed, you can call SecureConfig.Encrypt from the command line:

SecureConfig --help

You can use the --help option to get more details about the commands and their options.

Creating a new encryption key

Creating a new encryption key is as easy as typing:

SecureConfig generate

SecureConfig will output the encryption key in the console.

The encryption key should be stored securely. Each of your projects/products should have its own unique key if the key is used to encrypt a configuration file. Never check the encryption key into a source control.

Encrypt a file

You can encrypt a file using the following command:

Usage: SecureConfig encrypt -k {Key} {FileName}

The file is replaced. Add the -c option to output the encrypted content to your console instead of writing to the file system.

Decrypt a file

You can decrypt a file using the following command:

Usage: SecureConfig decrypt -k {Key} {FileName}

The file is replaced. Add the -c option to output the decrypted content to your console instead of writing to the file system.

About

SecureConfig.Encrypt is a lightweight .NET tool designed to safely encrypt sensitive configuration data inside your appsettings.json

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages