auth

Paddy 2015-03-20 Parent:e000b1c24fc0 Child:8ecb60d29b0d

147:7ae03163f578 Go to Latest

auth/request_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