What would be the best possible way to generate API keys and hash passwords in Nodejs?

I am using my own authentication and sort of worried about the present security of my API. What would you suggest would be a good way to generate API keys? And what would be a better way to hash the password?


For api keys I would suggest you node-uuid. For hashing passwords - builtin crypto. For api secrets you can also use node-uuid + crypto combined. Something like that (node repl):

> require('node-uuid')()
> require('crypto').createHash('sha256').update(_).update('salt').digest('hex');

Need Your Help

Possible compiler bug in Visual C++ 2012 (x86)?

c++ visual-c++ visual-studio-2012 visual-c++-2012 compiler-bug

I'm currently experiencing random floating point errors when compiling for x86 targets using VC++ 11 (CTP Update 1). See the short example "test.cpp" below, and compile using: