This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool Decrypte(string fileIn, string fileOut) | |
{ | |
string Password = "mypassword"; | |
bool msg = true; | |
FileStream fsIn = new FileStream(fileIn, FileMode.Open, FileAccess.Read); | |
FileStream fsOut = new FileStream(fileOut, FileMode.OpenOrCreate, FileAccess.Write); | |
PasswordDeriveBytes pdb = new PasswordDeriveBytes(Password, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); | |
Rijndael alg = Rijndael.Create(); | |
alg.Key = pdb.GetBytes(32); | |
alg.IV = pdb.GetBytes(16); |