If by
Quote:
"I want to retrieve the password from the password digest"
you mean
Quote:
"I want to get the original password text back"
Then you can't: SHA is not an encryption algorithm, it is a hashing algorithm. The difference is simple: hashing functions cannot be reversed to obtain the original input at all - that's the whole point of using them for password storage (preferably with a salt value to prevent identical passwords having identical hashes).
What you do is generate the hash from the entered password and salt, and compare that with the stored value. If the hashes match, it's correct. If they don't, it's not.
You can't recover passwords with this system - that's the whole idea - so your password store is of no use to anybody even if it is compromised as it can't be used to log in.