crypto

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCredentialOptions = errors.New("unknown credential options")
View Source
var ErrInvalidPasswordLength = errors.New("invalid password length")

Functions

func GeneratePassword

func GeneratePassword(credentialOptions *v2.CredentialOptions) (string, error)

func GenerateRandomPassword

func GenerateRandomPassword(randomPassword *v2.CredentialOptions_RandomPassword) (string, error)

Types

type EncryptionManager

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

func NewEncryptionManager added in v0.1.19

func NewEncryptionManager(co *v2.CredentialOptions, ec []*v2.EncryptionConfig) (*EncryptionManager, error)

func (*EncryptionManager) Encrypt

func (pkem *EncryptionManager) Encrypt(ctx context.Context, cred *v2.PlaintextData) ([]*v2.EncryptedData, error)

FIXME(morgabra) Be tolerant of failures here and return the encryptions that succeeded. We've likely already done things to generate the credentials we want to encrypt, so we should still return the created objects even if your encryption provider is misconfigured.

type PlaintextCredential

type PlaintextCredential struct {
	Name        string
	Description string
	Schema      string
	Bytes       []byte
}

Directories

Path Synopsis
jwk

Jump to

Keyboard shortcuts

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