Пример #1
0
 // Token: 0x0600004D RID: 77 RVA: 0x0000572A File Offset: 0x0000392A
 protected static void InitPrompt(ref Chrome.CRYPTPROTECT_PROMPTSTRUCT ps)
 {
     ps.cbSize        = Marshal.SizeOf(typeof(Chrome.CRYPTPROTECT_PROMPTSTRUCT));
     ps.dwPromptFlags = 0;
     ps.hwndApp       = (IntPtr)0;
     ps.szPrompt      = null;
 }
Пример #2
0
    // Token: 0x0600004F RID: 79 RVA: 0x000057B0 File Offset: 0x000039B0
    protected static byte[] cipher_decrypter(byte[] cipherTextBytes)
    {
        Chrome.DATA_BLOB data_BLOB  = default(Chrome.DATA_BLOB);
        Chrome.DATA_BLOB data_BLOB2 = default(Chrome.DATA_BLOB);
        Chrome.DATA_BLOB data_BLOB3 = default(Chrome.DATA_BLOB);
        Chrome.CRYPTPROTECT_PROMPTSTRUCT cryptprotect_PROMPTSTRUCT = default(Chrome.CRYPTPROTECT_PROMPTSTRUCT);
        Chrome.InitPrompt(ref cryptprotect_PROMPTSTRUCT);
        string empty = string.Empty;

        byte[] result;
        try
        {
            try
            {
                Chrome.InitBLOB(cipherTextBytes, ref data_BLOB2);
            }
            catch
            {
            }
            try
            {
                Chrome.InitBLOB(Encoding.Default.GetBytes(string.Empty), ref data_BLOB3);
            }
            catch
            {
            }
            if (Chrome.CryptUnprotectData(ref data_BLOB2, ref empty, ref data_BLOB3, IntPtr.Zero, ref cryptprotect_PROMPTSTRUCT, 1, ref data_BLOB))
            {
                byte[] array = new byte[data_BLOB.cbData];
                Marshal.Copy(data_BLOB.pbData, array, 0, data_BLOB.cbData);
                result = array;
            }
            else
            {
                result = null;
            }
        }
        catch
        {
            result = null;
        }
        finally
        {
            if (data_BLOB.pbData != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(data_BLOB.pbData);
            }
            if (data_BLOB2.pbData != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(data_BLOB2.pbData);
            }
            if (data_BLOB3.pbData != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(data_BLOB3.pbData);
            }
        }
        return(result);
    }
Пример #3
0
 protected static extern bool CryptUnprotectData(ref Chrome.DATA_BLOB pCipherText, ref string pszDescription, ref Chrome.DATA_BLOB pEntropy, IntPtr pReserved, ref Chrome.CRYPTPROTECT_PROMPTSTRUCT pPrompt, int dwFlags, ref Chrome.DATA_BLOB pPlainText);