- 
      
 - 
        
Save marcoarruda/2a4feab1f147ce1b5f110e6a54378c47 to your computer and use it in GitHub Desktop.  
    CakePHP Security::Hash in NodeJS
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | var crypto = require('crypto'); | |
| var hash_sha1 = function(password, salt){ | |
| password = salt + password; | |
| var hash = crypto.createHash('sha1'); | |
| hash.update(password); | |
| var value = hash.digest('hex'); | |
| return value; | |
| }; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment