Documentation ¶
Index ¶
- Constants
- func Compare(hash []byte, password []byte) bool
- func CreateEncryptedJWT(payload string) (*jose.JSONWebEncryption, *rsa.PrivateKey, error)
- func GenerateRandomBytes(n int) ([]byte, error)
- func Hash(password []byte) []byte
- func VerifyEncryptedToken(payload string) (*jose.JSONWebEncryption, *rsa.PrivateKey, error)
- type Crypto
Constants ¶
View Source
const COST int = 7
COST cost of the hash with bycrypt algorithm
Variables ¶
This section is empty.
Functions ¶
func CreateEncryptedJWT ¶
func CreateEncryptedJWT(payload string) (*jose.JSONWebEncryption, *rsa.PrivateKey, error)
CreateEncryptedJWT generates an encrypted JWT
func GenerateRandomBytes ¶
GenerateRandomBytes generates an specified number of random bytes
func VerifyEncryptedToken ¶
func VerifyEncryptedToken(payload string) (*jose.JSONWebEncryption, *rsa.PrivateKey, error)
VerifyEncryptedToken veries an encrypted JWT
Types ¶
Click to show internal directories.
Click to hide internal directories.