Adds Argon2 for password protection (#123)

This commit is contained in:
Kamron Batman 2020-05-01 22:42:39 -07:00 • committed by GitHub
parent 29467a3ed9
commit dad8a64fad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 1152 additions and 167 deletions

View file

@ -0,0 +1,34 @@
using System;
using System.Runtime.InteropServices;
namespace Server.Accounting.Security
{
[StructLayout(LayoutKind.Sequential)]
internal class Argon2Context
{
public IntPtr Out;
public uint OutLen;
public IntPtr Pwd;
public uint PwdLen;
public IntPtr Salt;
public uint SaltLen;
public IntPtr Secret;
public uint SecretLen;
public IntPtr AssocData;
public uint AssocDataLen;
public uint TimeCost;
public uint MemoryCost;
public uint Lanes;
public uint Threads;
public IntPtr AllocateCallback;
public IntPtr FreeCallback;
public uint Flags;
}
}