auth

Paddy 2015-03-20 Parent:d30a3a12d387 Child:8267e1c8bcd1

147:7ae03163f578 Go to Latest

auth/authcode_test.go

Randomly generate codes. We've been using our IDs for auth codes. But our IDs may at some point be non-random, for the purpose of optimising database performance, or some other perfectly valid reason. Auth codes we always want to be random, and have no relation to IDs, so why conflate them? Instead, we pull 16 random bytes out of crypto/rand.Reader and hex encode them.

History