how to read a encrypted html? need help
-
Hi everyone, i need your help This is my sym.cs file where it store the encryption part using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Security.Cryptography; namespace SecurePDFViewer { public class SymCrypto { private SymmetricAlgorithm symAlgorithm; private static byte[] saltValue = new byte[] {213,230,110,217,191,69,82,238}; private static byte[] IV = new byte[] { 207, 177, 154, 229, 191, 104, 44, 244, 86, 12, 63, 54, 94, 9, 88, 148 }; private static int keySize = 256; private static int pwIteration = 7; public SymCrypto() { //Creates the default implementation, which is RijndaelManaged 256 bits symAlgorithm = SymmetricAlgorithm.Create(); symAlgorithm.IV = IV; } public SymCrypto(string algorithmName) { symAlgorithm = SymmetricAlgorithm.Create(algorithmName); symAlgorithm.KeySize = keySize; symAlgorithm.IV = IV; } public byte[] EncryptData(string passphrase, byte[] plainBytes) { GenerateKey(passphrase); // Define memory stream which will be used to hold encrypted data MemoryStream memoryStream = new MemoryStream(); // Define cryptographic stream (Write mode for encryption) CryptoStream cryptoStream = new CryptoStream(memoryStream, symAlgorithm.CreateEncryptor(), CryptoStreamMode.Write); cryptoStream.Write(plainBytes, 0, plainBytes.Length); cryptoStream.FlushFinalBlock(); byte[] cipherBytes = memoryStream.ToArray(); // Close streams memoryStream.Close(); cryptoStream.Close(); return cipherBytes; } public string EncryptData(string passphrase, string plainText) { byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); return Convert.ToBase64String(EncryptData(passphrase, plainTextBytes)); } public byte[] DecryptData(string passphrase, byte[] cipherBytes) { GenerateKey(passphrase); // Define memory stream which will be used to hold encrypted data MemoryStream memoryStream = new MemoryStream(cipherBytes);
-
Hi everyone, i need your help This is my sym.cs file where it store the encryption part using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Security.Cryptography; namespace SecurePDFViewer { public class SymCrypto { private SymmetricAlgorithm symAlgorithm; private static byte[] saltValue = new byte[] {213,230,110,217,191,69,82,238}; private static byte[] IV = new byte[] { 207, 177, 154, 229, 191, 104, 44, 244, 86, 12, 63, 54, 94, 9, 88, 148 }; private static int keySize = 256; private static int pwIteration = 7; public SymCrypto() { //Creates the default implementation, which is RijndaelManaged 256 bits symAlgorithm = SymmetricAlgorithm.Create(); symAlgorithm.IV = IV; } public SymCrypto(string algorithmName) { symAlgorithm = SymmetricAlgorithm.Create(algorithmName); symAlgorithm.KeySize = keySize; symAlgorithm.IV = IV; } public byte[] EncryptData(string passphrase, byte[] plainBytes) { GenerateKey(passphrase); // Define memory stream which will be used to hold encrypted data MemoryStream memoryStream = new MemoryStream(); // Define cryptographic stream (Write mode for encryption) CryptoStream cryptoStream = new CryptoStream(memoryStream, symAlgorithm.CreateEncryptor(), CryptoStreamMode.Write); cryptoStream.Write(plainBytes, 0, plainBytes.Length); cryptoStream.FlushFinalBlock(); byte[] cipherBytes = memoryStream.ToArray(); // Close streams memoryStream.Close(); cryptoStream.Close(); return cipherBytes; } public string EncryptData(string passphrase, string plainText) { byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); return Convert.ToBase64String(EncryptData(passphrase, plainTextBytes)); } public byte[] DecryptData(string passphrase, byte[] cipherBytes) { GenerateKey(passphrase); // Define memory stream which will be used to hold encrypted data MemoryStream memoryStream = new MemoryStream(cipherBytes);
We didn't need to see all this code. So, you're saying you can decrypt it, but you want to display it in IE via a toolbar ? So, you want to intercept an HTTP request and decode it, right ? Does it have to be in a toolbar, could it be in an app that contains an IE control and then does the HTTP request ?
Christian Graus Driven to the arms of OSX by Vista.
-
We didn't need to see all this code. So, you're saying you can decrypt it, but you want to display it in IE via a toolbar ? So, you want to intercept an HTTP request and decode it, right ? Does it have to be in a toolbar, could it be in an app that contains an IE control and then does the HTTP request ?
Christian Graus Driven to the arms of OSX by Vista.
No, Cause that encrypt words is hardcoded How can i do like this: Use getElementsByName() if my var x=document.getElementsByName("encrypt"); How can i capture those encrypt in the html and ancrypt it?
text"
text
-
We didn't need to see all this code. So, you're saying you can decrypt it, but you want to display it in IE via a toolbar ? So, you want to intercept an HTTP request and decode it, right ? Does it have to be in a toolbar, could it be in an app that contains an IE control and then does the HTTP request ?
Christian Graus Driven to the arms of OSX by Vista.
No, Cause this encrypt is hardcode How can i do like this: Use getElementsByName() if my var x=document.getElementsByName("encrypt"); How can i capture those encrypt in the html and ancrypt it?
text"
text