Generating a SHA-1 based on time is not safe. A collision can easily be generated, and if parallel operations are used they will eventually collide. This reads random bytes and uses them for the SHA-1 hash. It will return an error if the rand.Read() fails. |
||
|---|---|---|
| .. | ||
| store.go | ||
| store_test.go | ||