Password protected pdf files generating different hash all the time



I am using Aspose Pdf licensed version and i have saved password protected pdf file to a normal file at some other path and reading sha256Hash from plaintext file.

Each time i am making this operation with same pdf files, it is returning me a different sha256Hash.

[Attaching password protected file and can be accessible through “sample-protected.pdf (2.5 KB)

Kindly advise.



Thank you for contacting support.

Would you please share SSCCE code so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using latest version of the API.



Please find attached sample code(SSCCE). (968 Bytes)
Kindly provide updates.

Thank you.



We have worked with your data and noticed that same hash is being generated every time. Would you please ensure using Aspose.PDF for .NET 19.5 and then share your kind feedback with us. SHA256.PNG


Thank You for your efforts,
We did check the same applying required license, the hashes generated for once instance of the program are same. But it’s still a different hash for the same file when the program runs again.
For reference please check below program output images.
Instance1.PNG (5.2 KB)
Instance2.PNG (10.5 KB)



Thank you for elaborating it further.

We have been able to notice different hashes for different instances. A ticket with ID PDFNET-46538 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.