示例#1
0
// SetPassword sets the user password after encrypt it
func (u *User) SetPassword(password string) {
	u.EncryptPassword = crypt.Crypt(password, crypt.RandStringBytes(2))
}
示例#2
0
func (c *Client) GenerateKeys() {
	c.ClientID = crypt.RandStringBytes(10)
	c.ClientSecret = crypt.RandStringBytes(30)
}