cryptography

package
v0.0.0-...-0c82367 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BcryptAdapter

type BcryptAdapter struct{}

func NewBcryptAdapter

func NewBcryptAdapter() *BcryptAdapter

func (*BcryptAdapter) Compare

func (b *BcryptAdapter) Compare(hashedPassword, password string) error

func (*BcryptAdapter) Hash

func (b *BcryptAdapter) Hash(password string, salt int) (string, error)

type JWTAdapter

type JWTAdapter struct {
	Secret    []byte
	ExpiresIn int
}

func NewJWTAdapter

func NewJWTAdapter(secret []byte, exp int) *JWTAdapter

func (*JWTAdapter) Generate

func (j *JWTAdapter) Generate(id string) (string, error)

Jump to

Keyboard shortcuts

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