navneet83 / Cross-platform-AES-encryption

Basic cross platform AES encryption
Apache License 2.0
320 stars 152 forks source link

Decryption of file missing last 10 characters from ending #19

Closed pablofridman closed 9 years ago

pablofridman commented 9 years ago

Before star thanks for the code! very useful. I having a problem with big texts, its always cutting the text in some point, I'm not sure if it is cutting the text in the encryption or in the decryption process. Thanks! Pablo

muhsindemir commented 9 years ago

in c# library CryptLib.cs Change Line Number about 120

byte[] plainText = _rcipher.CreateEncryptor().TransformFinalBlock(_enc.GetBytes(_inputText), 0,_inputText.Length);

To

byte[] plainText = _rcipher.CreateEncryptor().TransformFinalBlock(_enc.GetBytes(_inputText), 0, _enc.GetBytes(_inputText).Length);

pablofridman commented 9 years ago

Thanks a lot