Documentation
¶
Index ¶
- func IsJWTSecret(key string) bool
- type Service
- func (s *Service) DecryptWithJWT(ciphertext string) (string, error)
- func (s *Service) DecryptWithMaster(ciphertext string) (string, error)
- func (s *Service) EncryptWithJWT(plaintext string) (string, error)
- func (s *Service) EncryptWithMaster(plaintext string) (string, error)
- func (s *Service) SetJWTKey(jwtSecret string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsJWTSecret ¶
IsJWTSecret checks if a key should be encrypted with master key (JWT secret only)
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides encryption and decryption functionality
func NewService ¶
NewService creates encryption service with only master key (for JWT secret bootstrap)
func NewServiceWithJwtLey ¶
NewServiceWithJwtLey creates a new encryption service with master key derived from database path
func (*Service) DecryptWithJWT ¶
DecryptWithJWT decrypts data using JWT-derived key (for other secrets)
func (*Service) DecryptWithMaster ¶
DecryptWithMaster decrypts data using master key (for JWT secret)
func (*Service) EncryptWithJWT ¶
EncryptWithJWT encrypts data using JWT-derived key (for other secrets)
func (*Service) EncryptWithMaster ¶
EncryptWithMaster encrypts data using master key (for JWT secret)
Click to show internal directories.
Click to hide internal directories.