LLF
LLF

Reputation: 707

Is it possible set hashed password to PDF file?

I have user account password that was hashed in database and my system can export some PDF for certain user. Is it possible to set the PDF password to be the same on as user account password?

Upvotes: 0

Views: 99

Answers (1)

mkl
mkl

Reputation: 95898

It is the idea of hashing a password that the password itself cannot be deduced from the value stored in the database while still allowing for a fairly sure recognition of the password during authentication. In addition multiple hashing iterations and salt and pepper usually are used to make this even less possible.

Thus, in general deducing the password well enough to use it for encoding some PDF should not be possible.

That been said, hashing is a part of some PDF encryption algorithms, too. If you could describe the exact hashing process of the passwords in your database, we can tell for sure whether by luck your task might still be feasible.

Beware, though, it would indicate that your password hashing is not worth a dime if your task was possible. Thus, you should hope that it is not.

Upvotes: 1

Related Questions