package authimport ("golang.org/x/crypto/bcrypt")// HashPassword hashes a password using bcryptfunc HashPassword(password string) (string, error) {bytes, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)return string(bytes), err}// CheckPassword checks if a password matches the hashfunc CheckPassword(password, hash string) bool {err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))return err == nil}