skynyrd
12/16/2016 - 6:50 AM

Scrypt.NET usage

Scrypt.NET usage

// Security, Scrypt, C#, ASP.NET Core

using System;
using Scrypt;

namespace ConsoleApplication
{
    public class Program
    {
        public static void Main(string[] args)
        {
            ScryptEncoder encoder = new ScryptEncoder();
            string hashsedPassword = encoder.Encode("mypassword");

            bool areEquals = encoder.Compare("mypassworD", hashsedPassword);
            Console.WriteLine(hashsedPassword);
            Console.WriteLine(areEquals);
        }
    }
}