Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.register = async (req, res, next) => {
- let key;
- await crypto.pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
- if (err){
- console.log(err)
- console.log('err')
- }
- key = derivedKey.toString('hex')
- console.log('callback'+key)
- })
- console.log('post-await'+key)
- }
Add Comment
Please, Sign In to add comment