You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
604 B
22 lines
604 B
using System.Numerics;
|
|
using System.Runtime.CompilerServices;
|
|
using WhiteRabbitUnmanagedBridge;
|
|
|
|
namespace WhiteRabbit
|
|
{
|
|
internal static class MD5Digest
|
|
{
|
|
// It only returns first component of MD5 hash
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static unsafe uint[] Compute(PhraseSet input)
|
|
{
|
|
var result = new uint[Constants.PhrasesPerSet];
|
|
fixed (uint* resultPointer = result)
|
|
{
|
|
MD5Unmanaged.ComputeMD5(input.Buffer, resultPointer);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|
|
|