using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace ITC81DB_0H.Part11_Encryption { public partial class Encryption { private const string PathDll = "SD Card\\Run\\DllAes128.dll"; public delegate void fnAesEncryptionCB(ref auth_encryption_status_t encryption_status); public static fnAesEncryptionCB fnAesEncryptionCallBack; [DllImport(PathDll, CallingConvention = CallingConvention.Winapi)] public static extern void DLL_AES_Register_EncryptionCB(fnAesEncryptionCB func); [DllImport(PathDll, CallingConvention = CallingConvention.Winapi)] public static extern void DLL_AES_Activation(); [DllImport(PathDll, CallingConvention = CallingConvention.Winapi)] public static extern int DLL_AES_Encryption(IntPtr inFileName, IntPtr outFileName, bool encrypt, bool compress); } }