Shuttle / Shuttle.Core.Encryption

Encryption adapter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shuttle.Core.Encryption

PM> Install-Package Shuttle.Core.Encryption

Provides an encryption adapter through the IEncryptionAlgorithm interface.

Implementations available in this package:

  • TripleDesEncryptionAlgorithm
  • NullEncryptionAlgorithm

There is also an IEncryptionService that acts as a central container for all registered IEncryptionAlgorithm implementations.

Configuration

In order to add encryption:

services.AddEncryption(builder => {
	builder.TripleDesOptions.Key = "encryption-key";

	builder.AddTripleDes();
});

Will try to add the EncryptionService singleton, with an option to add the TripleDesEncryptionAlgorithm instance using the given symmetric Key.

The default JSON settings structure is as follows:

{
	"Shuttle": {
		"TripleDes": {
			"Key": "triple-des-key"
		}
	}
}

About

Encryption adapter.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C# 100.0%