crypta

package
v0.0.0-...-e78ca02 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Issuer = "gophkeeper"
)

Variables

This section is empty.

Functions

func DecryptSecret

func DecryptSecret(service *Service, s *models.Secret) (*datapb.Secret, error)

Types

type JWTManager

type JWTManager struct {
	// contains filtered or unexported fields
}

func NewJWTManager

func NewJWTManager(config config.AuthConfig) *JWTManager

func (*JWTManager) Generate

func (manager *JWTManager) Generate(user *models.User) (string, error)

func (*JWTManager) Verify

func (manager *JWTManager) Verify(accessToken string) (*models.UserClaims, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(keysDir string) (*Service, error)

func (*Service) Decrypt

func (s *Service) Decrypt(data []byte) ([]byte, error)

func (*Service) Encrypt

func (s *Service) Encrypt(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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