Typically for user passwords we store their hashes and salt alongside in the database - one per user.
I wonder the security implications of hashing the same password twice and storing locally both.
hash(pwd, salt1) # => $digest1$salt1
hash(pwd, salt2) # => $digest2$salt2
Would storing these two in the same database make it easier for an attacker to figure out the password? Does it matter if the 2nd hashing uses salt1 or salt2?
The use-case for this is that I want to use the 2nd hash as an encryption key for user's secrets.