我不知道这里出了什么问题。一切正常并加载,但“加密”数据与原始数据相同。没有进行加密。
if (entry.type == stype.file)
{
aes.IV = aes.Key; //for now just testing..
byte[] startData = File.ReadAllBytes(baseDir + entries[i]);
aes.CreateEncryptor(aes.Key, aes.IV).TransformFinalBlock(startData,
0,
startData.Length);
entry.data = startData;
entry.data_size = (ulong)entry.data.LongLength;
ulong eSize = (ulong)(29 + (ulong)entry.name.Length + entry.data_size);
total_size += eSize;
entry.entry_size = eSize;
}
entry.data
与原始 startData 相同。是TransformFinalBlock
不是加密了startData
?