Changeset 395 in code for trunk/user.go
- Timestamp:
- Aug 19, 2020, 9:24:25 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user.go
r385 r395 3 3 import ( 4 4 "crypto/sha256" 5 "encoding/base64"6 5 "encoding/binary" 6 "encoding/hex" 7 7 "fmt" 8 8 "time" … … 111 111 binary.LittleEndian.PutUint64(b[:], uint64(u.ID)) 112 112 h := sha256.Sum256(b[:]) 113 return base64.RawStdEncoding.EncodeToString(h[:])113 return hex.EncodeToString(h[:16]) 114 114 } 115 115
Note:
See TracChangeset
for help on using the changeset viewer.