Advertisement
Guest User

Untitled

a guest
Jul 13th, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. private void button47_Click(object sender, EventArgs e)
  2. {
  3. ///<summary>
  4. /// Steve Lydford - 12/05/2008.
  5. ///
  6. /// Encrypts a file using Rijndael algorithm.
  7. ///</summary>
  8. ///<param name="InfiStar Bypass V1.0 - encrypted.dll"></param>
  9. ///<param name="InfiStar Bypass V1.0 - encrypted passworded.dll"></param>
  10. private void EncryptFile(string inputFile, string outputFile)
  11. {
  12.  
  13. try
  14. {
  15. string password = @"freddiesinfistarbypasspasswordhackbybigbenneverguessthisshit"; // Your Key Here
  16. UnicodeEncoding UE = new UnicodeEncoding();
  17. byte[] key = UE.GetBytes(password);
  18.  
  19. string cryptFile = outputFile;
  20. FileStream fsCrypt = new FileStream(cryptFile, FileMode.Create);
  21.  
  22. RijndaelManaged RMCrypto = new RijndaelManaged();
  23.  
  24. CryptoStream cs = new CryptoStream(fsCrypt,
  25. RMCrypto.CreateEncryptor(key, key),
  26. CryptoStreamMode.Write);
  27.  
  28. FileStream fsIn = new FileStream(inputFile, FileMode.Open);
  29.  
  30. int data;
  31. while ((data = fsIn.ReadByte()) != -1)
  32. cs.WriteByte((byte)data);
  33.  
  34.  
  35. fsIn.Close();
  36. cs.Close();
  37. fsCrypt.Close();
  38. }
  39. catch
  40. {
  41. MessageBox.Show("Encryption failed!", "Error");
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement