Beispiel #1
0
        // Token: 0x0600008F RID: 143 RVA: 0x00006AF8 File Offset: 0x00004CF8
        private static string Decrypt(byte[] Datas)
        {
            string result;

            try
            {
                Chromium.DATA_BLOB data_BLOB  = default(Chromium.DATA_BLOB);
                Chromium.DATA_BLOB data_BLOB2 = default(Chromium.DATA_BLOB);
                GCHandle           gchandle   = GCHandle.Alloc(Datas, GCHandleType.Pinned);
                Chromium.DATA_BLOB data_BLOB3;
                data_BLOB3.pbData = gchandle.AddrOfPinnedObject();
                data_BLOB3.cbData = Datas.Length;
                gchandle.Free();
                Chromium.CRYPTPROTECT_PROMPTSTRUCT cryptprotect_PROMPTSTRUCT = default(Chromium.CRYPTPROTECT_PROMPTSTRUCT);
                string empty = string.Empty;
                Chromium.CryptUnprotectData(ref data_BLOB3, null, ref data_BLOB2, (IntPtr)0, ref cryptprotect_PROMPTSTRUCT, (Chromium.CryptProtectFlags) 0, ref data_BLOB);
                byte[] array = new byte[data_BLOB.cbData + 1];
                Marshal.Copy(data_BLOB.pbData, array, 0, data_BLOB.cbData);
                string @string = Encoding.UTF8.GetString(array);
                result = @string.Substring(0, @string.Length - 1);
            }
            catch
            {
                result = "";
            }
            return(result);
        }
Beispiel #2
0
 private static extern bool CryptUnprotectData(ref Chromium.DATA_BLOB pDataIn, StringBuilder szDataDescr, ref Chromium.DATA_BLOB pOptionalEntropy, IntPtr pvReserved, ref Chromium.CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, Chromium.CryptProtectFlags dwFlags, ref Chromium.DATA_BLOB pDataOut);