DotaCore.Security
15.2.1
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
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 | 720 | 4/4/2021 |