Encryption adapter.
$ dotnet add package Shuttle.Core.EncryptionPM> Install-Package Shuttle.Core.Encryption
Provides an encryption adapter through the IEncryptionAlgorithm interface.
Implementations available in this package:
TripleDesEncryptionAlgorithmNullEncryptionAlgorithmThere is also an IEncryptionService that acts as a central container for all registered IEncryptionAlgorithm implementations.
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"
}
}
}