func VerifyUserPassword(userInfo *user.UserInfo, password string) bool { enteredEncryptPassword := encrypt.EncryptText1Way([]byte(password), userInfo.Salt) if !reflect.DeepEqual(userInfo.EncryptedPassword, enteredEncryptPassword) { return false } return true }
func VerifyClientPassword(clientInfo *client.ClientInfo, password string) bool { enteredEncryptPassword := encrypt.EncryptText1Way([]byte(password), clientInfo.Salt) if !reflect.DeepEqual(clientInfo.EncryptedPassword, enteredEncryptPassword) { return false } return true }