HCenter.Encryption
1.1.1
dotnet add package HCenter.Encryption --version 1.1.1
NuGet\Install-Package HCenter.Encryption -Version 1.1.1
<PackageReference Include="HCenter.Encryption" Version="1.1.1" />
paket add HCenter.Encryption --version 1.1.1
#r "nuget: HCenter.Encryption, 1.1.1"
// Install HCenter.Encryption as a Cake Addin #addin nuget:?package=HCenter.Encryption&version=1.1.1 // Install HCenter.Encryption as a Cake Tool #tool nuget:?package=HCenter.Encryption&version=1.1.1
/// <summary> /// 非对称加密类型 /// </summary> public enum AsymmetricProviderType { RSA = 1, RSA2 = 2, SM2 = 3, } /// <summary> /// 对称加密类型 /// </summary> public enum SymmetricProviderType { AES128 = 1, AES192 = 2, AES256 = 3, DES = 4, TripleDES128 = 5, TripleDES192 = 6, SM4 = 7, SM4JAVA = 8, SM4JS = 9 } /// <summary> /// 哈希加密类型 /// </summary> public enum HashingProviderType { HMACMD5 = 1, HMACSHA1 = 2, HMACSHA256 = 3, HMACSHA384 = 4, HMACSHA512 = 5, MD4 = 6, MD5 = 7, SHA1 = 8, SHA256 = 9, SHA384 = 10, SHA512 = 11, SM3 = 12, }
/// <summary> /// 所加密创建工厂 /// </summary> public sealed class CryptoFactory { /// <summary> /// 创建哈希加密提供程序 /// </summary> /// <param name="providerTypestr"></param> /// <returns></returns> public static IHashingProvider CreateHashing(string providerTypestr = "SHA256") { return HashingProviderFactory.Create(providerTypestr); } /// <summary> /// 创建哈希加密提供程序 /// </summary> /// <param name="providerType"></param> /// <returns></returns> public static IHashingProvider CreateHashing(HashingProviderType providerType = HashingProviderType.SHA256) { return HashingProviderFactory.Create(providerType); } //--------------------------------------------------------------------------------------------------------------------- /// <summary> /// 创建非对称加密提供程序 /// </summary> /// <param name="providerTypestr"></param> /// <returns></returns> public static IAsymmetricProvider CreateAsymmetric(string providerTypestr = "RSA") { return AsymmetricProviderFactory.Create(providerTypestr); } /// <summary> /// 创建非对称加密提供程序 /// </summary> /// <param name="providerType"></param> /// <returns></returns> public static IAsymmetricProvider CreateAsymmetric(AsymmetricProviderType providerType = AsymmetricProviderType.RSA) { return AsymmetricProviderFactory.Create(providerType); } //--------------------------------------------------------------------------------------------------------------------- /// <summary> /// 创建对称加密提供程序 /// </summary> /// <param name="providerTypestr"></param> /// <returns></returns> public static ISymmetricProvider CreateSymmetric(string providerTypestr = "SM4") { return SymmetricProviderFactory.Create(providerTypestr); } /// <summary> /// 创建对称加密提供程序 /// </summary> /// <param name="providerType"></param> /// <returns></returns> public static ISymmetricProvider CreateSymmetric(SymmetricProviderType providerType = SymmetricProviderType.SM4) { return SymmetricProviderFactory.Create(providerType); } }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- BouncyCastle.NetCoreSdk (>= 1.9.3.1)
- Newtonsoft.Json (>= 12.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HCenter.Encryption:
Package | Downloads |
---|---|
DotNetCore.KestrelHttpServer
Simple library that allows to power micro-services architecture. |
GitHub repositories
This package is not used by any popular GitHub repositories.