DotaCore.Security
15.2.1
.NET 5.0
dotnet add package DotaCore.Security --version 15.2.1
NuGet\Install-Package DotaCore.Security -Version 15.2.1
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="DotaCore.Security" Version="15.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotaCore.Security --version 15.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotaCore.Security, 15.2.1"
#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 DotaCore.Security as a Cake Addin
#addin nuget:?package=DotaCore.Security&version=15.2.1
// Install DotaCore.Security as a Cake Tool
#tool nuget:?package=DotaCore.Security&version=15.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotaCore.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) { }
}
JsonWebToken
IJsonWebTokenService
public interface IJsonWebTokenService
{
Dictionary<string, object> Decode(string token);
string Encode(IList<Claim> claims);
}
JsonWebTokenService
public class JsonWebTokenService : IJsonWebTokenService
{
public JsonWebTokenService(JsonWebTokenSettings jsonWebTokenSettings) { }
public Dictionary<string, object> Decode(string token) { }
public string Encode(IList<Claim> claims) { }
}
JsonWebTokenSettings
public class JsonWebTokenSettings
{
public JsonWebTokenSettings(string key, TimeSpan expires) { }
public JsonWebTokenSettings(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() { }
}
Extensions
public static class Extensions
{
public static void AddCryptography(this IServiceCollection services, string key) { }
public static void AddHash(this IServiceCollection services) { }
public static void AddJsonWebToken(this IServiceCollection services, string key, TimeSpan expires) { }
public static void AddJsonWebToken(this IServiceCollection services, string key, TimeSpan expires, string audience, string issuer) { }
public static void AddJsonWebToken(this IServiceCollection services, JsonWebTokenSettings jsonWebTokenSettings) { }
}
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- Microsoft.Extensions.DependencyInjection (>= 5.0.1)
- System.IdentityModel.Tokens.Jwt (>= 6.9.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DotaCore.Security:
Package | Downloads |
---|---|
DotaCore.AspNetCore
DotaCore.AspNetCore |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
15.2.1 | 497 | 4/4/2021 |