YITC.DotNetCore.Security 16.26.0.2-yitc

This is a prerelease version of YITC.DotNetCore.Security.
There is a newer version of this package available.
See the version list below for details.
dotnet add package YITC.DotNetCore.Security --version 16.26.0.2-yitc                
NuGet\Install-Package YITC.DotNetCore.Security -Version 16.26.0.2-yitc                
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="YITC.DotNetCore.Security" Version="16.26.0.2-yitc" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YITC.DotNetCore.Security --version 16.26.0.2-yitc                
#r "nuget: YITC.DotNetCore.Security, 16.26.0.2-yitc"                
#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 YITC.DotNetCore.Security as a Cake Addin
#addin nuget:?package=YITC.DotNetCore.Security&version=16.26.0.2-yitc&prerelease

// Install YITC.DotNetCore.Security as a Cake Tool
#tool nuget:?package=YITC.DotNetCore.Security&version=16.26.0.2-yitc&prerelease                

DotNetCore.Security

Cryptography

ICryptographyService

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

    string Encrypt(string value, string salt);
}

CryptographyService

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

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

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

Hash

IHashService

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

HashService

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

JWT

IJwtService

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

    string Encode(IList<Claim> claims);
}

JwtService

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

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

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

JwtSettings

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; }
}

Extensions

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 Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

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

Package Downloads
YITC.DotNetCore.AspNetCore

DotNetCore.AspNetCore forked by YITC

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
16.30.0.4 681 4/15/2022
16.26.0.3 535 3/17/2022
16.26.0.2-yitc 194 3/16/2022
16.26.0 524 3/16/2022
16.26.0-yitc 176 3/16/2022