ForgeCore/ForgeCoreAPI/Utilities/HashHelpers.cs
2024-12-17 12:10:01 -07:00

19 lines
No EOL
398 B
C#

using System.Security.Cryptography;
namespace ForgeCoreAPI.Utilities;
public class HashHelpers
{
public static byte[] EncodeMD5(byte[] input)
{
MD5 md5 = MD5.Create();
return md5.ComputeHash(input);
}
public static byte[] MakeRandomBytes(int length)
{
ByteLayer A = new ByteLayer();
A.InsertRandomBytes(length);
return A.Bytes;
}
}