DotNetCore.Security 16.50.0

.NET 6.0
Install-Package DotNetCore.Security -Version 16.50.0
dotnet add package DotNetCore.Security --version 16.50.0
<PackageReference Include="DotNetCore.Security" Version="16.50.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetCore.Security --version 16.50.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetCore.Security, 16.50.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotNetCore.Security as a Cake Addin
#addin nuget:?package=DotNetCore.Security&version=16.50.0

// Install DotNetCore.Security as a Cake Tool
#tool nuget:?package=DotNetCore.Security&version=16.50.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.




public interface ICryptographyService
    string Decrypt(string value, string salt);

    string Encrypt(string value, string salt);


public class CryptographyService : ICryptographyService
    public CryptographyService(string key) { }

    public string Decrypt(string value, string salt) { }

    public string Encrypt(string value, string salt) { }



public interface IHashService
    string Create(string value, string salt);


public class HashService : IHashService
    public string Create(string value, string salt) { }



public interface IJwtService
    Dictionary<string, object> Decode(string token);

    string Encode(IList<Claim> claims);


public class JwtService : IJwtService
    public JwtService(JwtSettings settings) { }

    public Dictionary<string, object> Decode(string token) { }

    public string Encode(IList<Claim> claims) { }


public class JwtSettings
    public JwtSettings(string key, TimeSpan expires) { }

    public JwtSettings(string key, TimeSpan expires, string audience, string issuer) : this(key, expires) { }

    public string Audience { get; }

    public TimeSpan Expires { get; }

    public string Issuer { get; }

    public SecurityKey SecurityKey { get; }

    public TokenValidationParameters TokenValidationParameters { get; }


public static class Extensions
    public static void AddCryptographyService(this IServiceCollection services, string key) { }

    public static void AddHashService(this IServiceCollection services) { }

    public static void AddJwtService(this IServiceCollection services, JwtSettings settings) { }
Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DotNetCore.Security:

Package Downloads


GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on DotNetCore.Security:

Repository Stars
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 14, Clean Code, SOLID, DDD.
😃A simple and practical CMS implemented by .NET 6 + FreeSql;前后端分离、Docker部署、OAtuh2授权登录、自动化部署DevOps、自动同步至Gitee、代码生成器、仿掘金专栏
Version Downloads Last updated
16.50.0 38 6/24/2022