π
securityapinodejs
How long should an API key be? 32 random bytes, and store the hash
128 random bits are already out of reach of guessing, so 32 bytes is plenty. What matters more is how you store the key: in our test, bcrypt took 76 ms per request where SHA-256 took 1.3 Β΅s.
3 Dec 20266 min readRead β