private bool isCertCp(byte[] part)
        {
            if (part.Length < 0x300)
            {
                return(false);
            }
            else if (part.Length > 0x300)
            {
                Array.Resize(ref part, 0x300);
            }

            if (part[0x184] == 'C' && part[0x185] == 'P')
            {
                byte[] newHash = sha.ComputeHash(part);
                byte[] oldHash = Shared.HexStringToByteArray(certCpHash);

                if (Shared.CompareByteArrays(newHash, oldHash))
                {
                    return(true);
                }
            }

            return(false);
        }
Example #2
0
        private bool IsCertCa(byte[] part)
        {
            if (part.Length < 1024)
            {
                return(false);
            }

            if (part.Length > 1024)
            {
                Array.Resize <byte>(ref part, 1024);
            }

            return(part[644] == 67 && part[645] == 65 && Shared.CompareByteArrays(sha.ComputeHash(part), Shared.HexStringToByteArray("5B7D3EE28706AD8DA2CBD5A6B75C15D0F9B6F318")));
        }
Example #3
0
        private bool IsCertCp(byte[] part)
        {
            if (part.Length < 768)
            {
                return(false);
            }

            if (part.Length > 768)
            {
                Array.Resize <byte>(ref part, 768);
            }

            return(part[388] == 67 && part[389] == 80 && Shared.CompareByteArrays(sha.ComputeHash(part), Shared.HexStringToByteArray("6824D6DA4C25184F0D6DAF6EDB9C0FC57522A41C")));
        }
Example #4
0
        private bool IsCertXs(byte[] part)
        {
            if (part.Length < 768)
            {
                return(false);
            }

            if (part.Length > 768)
            {
                Array.Resize <byte>(ref part, 768);
            }

            return(part[388] == 88 && part[389] == 83 && Shared.CompareByteArrays(sha.ComputeHash(part), Shared.HexStringToByteArray("09787045037121477824BC6A3E5E076156573F8A")));
        }