﻿using System;

namespace Ssemi.Common.Core
{
    /// <summary>Cryptography Library</summary>
    public static class Cryptography
	{
        public static string Bcrypt(string input)
        {
            return Bcrypt(input, 11);
        }
        public static String Bcrypt(string input, int workFactor)
        {
            return BCrypt.Net.BCrypt.HashPassword(input, BCrypt.Net.BCrypt.GenerateSalt(workFactor));
		}
        public static bool BcryptVerify(string text, string hash)
        {
            return BCrypt.Net.BCrypt.Verify(text, hash);
        }
    }
}