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