0
Reply

What is the problem of this encryption and decryption code?

M Mir

M Mir

Aug 7 2012 3:10 AM
1.1k
Hi everyone,
I need to encrypt and decrypt a swf file. For this, I'm using a code like this(I attached the FileEncryptor class):

 var fEn = new FileEncryptor("password");

            fEn.AesEncrypt(@"C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg", @"C:\Users\Public\Pictures\Sample Pictures\PenguinsEn.jpg");
            fEn.AesDecrypt(@"C:\Users\Public\Pictures\Sample Pictures\PenguinsEn.jpg", @"C:\Users\Public\Pictures\Sample Pictures\Penguins1.jpg");

            fEn.AesEncrypt(@"C:\Users\Public\Videos\Sample Videos\demo.swf", @"C:\Users\Public\Videos\Sample Videos\dec\demo.swf");
            fEn.AesDecrypt(@"C:\Users\Public\Videos\Sample Videos\dec\demo.swf", @"C:\Users\Public\Videos\Sample Videos\demo1.swf");

However, after decrypting the encrypted swf file, I can't play that in flash player,
I also tested the code for pictures and worked well.
What's the problem?


thanks 

Attachment: fileencryptor.zip