Esempio n. 1
0
        public byte[] Decrypt()
        {
            byte[] encrypted_data = GetEncryptedSource();
            if (encrypted_data.Length == 0)
            {
                Win32.Print("ERROR: Failed to detect encrypted data for method!");
                return(new byte[0]);
            }

            Win32.Print("Encrypted: " + BitConverter.ToString(encrypted_data));

            byte[] decrypted_data = new byte[0];
            if (this.Encryption.Type == EncryptionType.aes)
            {
                decrypted_data = Decryption.DecryptAES(encrypted_data, GetDecryptionKey());
            }
            else if (this.Encryption.Type == EncryptionType.xor)
            {
                decrypted_data = Decryption.DecrypteXOR(encrypted_data, 0x16);
            }
            else if (this.Encryption.Type == EncryptionType.rsa)
            {
                decrypted_data = Decryption.DecryptRSA(encrypted_data, new byte[0]);
            }

            return(decrypted_data);
        }