(pwd string)
| 94 | } |
| 95 | |
| 96 | func (u *User) SetPassword(pwd string) *User { |
| 97 | u.Salt = random.String(16) |
| 98 | u.PwdHash = TwoHashPwd(pwd, u.Salt) |
| 99 | u.PwdTS = time.Now().Unix() |
| 100 | return u |
| 101 | } |
| 102 | |
| 103 | func CanSeeHides(permission int32) bool { |
| 104 | return permission&1 == 1 |
no test coverage detected