Guest User

Untitled

a guest
Nov 21st, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. exports.register = async (req, res, next) => {
  2.  
  3. let key;
  4. await crypto.pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
  5. if (err){
  6. console.log(err)
  7. console.log('err')
  8. }
  9. key = derivedKey.toString('hex')
  10. console.log('callback'+key)
  11. })
  12.  
  13. console.log('post-await'+key)
  14.  
  15. }
Add Comment
Please, Sign In to add comment