public Math() { #if Mono #else try { if (System.Environment.Is64BitProcess) { _nativeLibraryManager = new NativeLibraryManager("Assemblies/Library_Correction_x64.dll"); } else { _nativeLibraryManager = new NativeLibraryManager("Assemblies/Library_Correction_x86.dll"); } _mul = _nativeLibraryManager.GetMethod <MulDelegate>("mul"); } catch (Exception e) { Log.Warning(e); } #endif _gfSize = ((1 << _gfBits) - 1); _gf_exp = new byte[2 * _gfSize]; _gf_log = new int[_gfSize + 1]; _inverse = new byte[_gfSize + 1]; GenerateGF(); InitMulTable(); }
static Crc32_Castagnoli() { #if Mono #else try { if (System.Environment.Is64BitProcess) { _nativeLibraryManager = new NativeLibraryManager("Assemblies/Library_Security_x64.dll"); } else { _nativeLibraryManager = new NativeLibraryManager("Assemblies/Library_Security_x86.dll"); } _compute = _nativeLibraryManager.GetMethod <ComputeDelegate>("compute_Crc32_Castagnoli"); } catch (Exception e) { Log.Warning(e); } #endif }