From 982743668fdffbf6a12b3df4cb5cfdf546bbf068 Mon Sep 17 00:00:00 2001 From: JupiterRider <60042618+JupiterRider@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:35:37 +0100 Subject: [PATCH] hash methods added --- Raylib-cs/interop/Raylib.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Raylib-cs/interop/Raylib.cs b/Raylib-cs/interop/Raylib.cs index cc49acd..d5321b3 100644 --- a/Raylib-cs/interop/Raylib.cs +++ b/Raylib-cs/interop/Raylib.cs @@ -670,6 +670,18 @@ public static unsafe partial class Raylib [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern byte* DecodeDataBase64(byte* data, int* outputSize); + /// Compute CRC32 hash code + [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern uint ComputeCRC32(byte* data, int dataSize); + + /// Compute MD5 hash code, returns static int[4] (16 bytes) + [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern uint* ComputeMD5(byte* data, int dataSize); + + /// Compute SHA1 hash code, returns static int[5] (20 bytes) + [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern uint* ComputeSHA1(byte* data, int dataSize); + /// Open URL with default system browser (if available) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void OpenURL(sbyte* url);