auth

package
v0.0.0-...-4f9d474 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashedPassword, password string) error

Compare 比较密文和明文是否相同.

func Encrypt

func Encrypt(source string) (string, error)

Encrypt 使用 bcrypt 加密纯文本.

func Sign

func Sign(secretID string, secretKey string, iss, aud string) string

Sign 基于给定的 secretID、secretKey、iss 和 aud 生成一个 JWT Token.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL