0

I need to be sure that several files are not changed. For this purpose I'm using SHA256 calculation utility on archyved files:

CertUtil -hashfile arch.rar SHA256 >>arch.rar.sha256.txt

I do archive with password:

"C:\Program Files\WinRAR\WinRAR.exe" a -ppass arch.rar file1 file2

Files are not changed, but each time I do new archive I have different hash. Why?

1 Answer 1

1

It's because when generating the encryption key (which is based on your password), there is a random factor involved.

Practically, archiving the same files at same compression rate with no encryption should result in identical files, while archiving the same files at same compression rate with encryption should result in different files.

2
  • Can I get hash of files before encrypt from *.rar file?
    – vico
    Jun 23, 2017 at 11:54
  • No, you will have to get their hashes without using encryption.
    – Overmind
    Jun 28, 2017 at 8:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .