So i'm currently working on game files that are encrypted via blowfish, to modify them and use them in the game again. The decryption works wonderfully painless, using just these 3 lines:
Code: Select all
Encryption blowfish KEY
log MEMORY_FILE FILESTART FILESIZE MEMORY_FILE
Encryption "" ""
However, it seems i can't ENcrypt with the same. If i use the above on an encrypted file once, it's plain, but when i use it on the file twice, the resulting file doesn't match the original.
I don't know much about encryptions, which is why i like using QuickBMS which supports tons of them natively, so i just assumed you could use the same command to encrypt a file again with a certain key. Is that not the case?
edit: Unrelated to this, but isn't there some kind of simple bytesum function somewhere in QuickBMS? I was looking for it, but didn't find anything. I somehow felt like there should have been, even though it's trivial to solve it with just 4 lines of code:
Code: Select all
for i = 0 < FILESIZE
get SBYTE byte
math SUM + SBYTE
next i