Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

readme.md

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 password) { }

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

    bool Validate(string value, string salt, string hash);
}

HashService

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

    public bool Validate(string value, string salt, string hash) { }
}

Extensions

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

    public static void AddHashService(this IServiceCollection services) { }
}