Carubbi.Security
1.0.0
dotnet add package Carubbi.Security --version 1.0.0
NuGet\Install-Package Carubbi.Security -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Carubbi.Security" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Carubbi.Security --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Carubbi.Security, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Carubbi.Security as a Cake Addin #addin nuget:?package=Carubbi.Security&version=1.0.0 // Install Carubbi.Security as a Cake Tool #tool nuget:?package=Carubbi.Security&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Carubbi.Security
A simple symmetric cryptography helper
1. Symmetrict Cryptography
Example:
var crypt = new SymmetricCrypt(SymmetricCryptProvider.TripleDES) { Key = "Your Salt Key" };
var encrypedData = crypt.Encrypt("plain text");
var decrypedData = crypt.Encrypt(encrypedData);
2. Protect a config section
Example:
2.1 To allow your app read a protected section, declare the provider in your config file
<?xml version="1.0"?>
<configuration>
<configProtectedData >
<providers>
<clear />
<add keyContainerName="KeyContainerName.txt"
name="CarubbiEncryptionProvider"
type="Carubbi.Security.TripleDESProtectedConfigurationProvider, Carubbi.Security" />
</providers>
</configProtectedData >
</configuration>
2.2 To protect your section by the first time, run this code in an app with the same configuration above:
TripleDESProtectedConfigurationProvider provider = new TripleDESProtectedConfigurationProvider();
provider.CreateKey(keyName);
if (ConfigurationManager.GetSection("connectionStrings") is ConfigurationSection section)
{
section.SectionInformation.ProtectSection("CarubbiEncryptionProvider");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 1,131 | 8/20/2018 |