1、加密

result,_ := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)

2、比对密码

bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(password))