Created
June 22, 2009 10:32
-
-
Save virtix/133911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="hashMyPassword"> | |
<cfset var password = "p@ssW0rd" /> | |
<cfset var crypto = createObject('component', 'Crypto') /> | |
<cfset var salt = crypto.genSalt() /> | |
<cfset var passwordHash = crypto.computeHash(password,salt) /> | |
<!--- | |
Store both the salt and the passwordHash in the database. | |
---> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment