1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Fixed bad paste output on decryption

This commit is contained in:
Uncled1023 2016-02-03 09:38:52 -08:00
parent 0055dc9395
commit 7897c15e9c

View File

@ -71,7 +71,7 @@ namespace Teknik.Areas.Paste.Controllers
byte[] ivBytes = Encoding.Unicode.GetBytes(paste.IV); byte[] ivBytes = Encoding.Unicode.GetBytes(paste.IV);
byte[] keyBytes = AES.CreateKey(password, ivBytes, paste.KeySize); byte[] keyBytes = AES.CreateKey(password, ivBytes, paste.KeySize);
data = AES.Decrypt(data, keyBytes, ivBytes); data = AES.Decrypt(data, keyBytes, ivBytes);
model.Content = Encoding.Unicode.GetString(data); model.Content = Convert.ToBase64String(data);
} }
switch (type.ToLower()) switch (type.ToLower())