secretsmgr

package
v0.0.0-...-3301e3d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretsMgr

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

SecretsMgr encrypts/decrypts padlfile secrets

func NewSecretsMgr

func NewSecretsMgr(client *client.Padl, keyMgr keymgr.Manager, pf *padlfile.File) *SecretsMgr

NewSecretsMgr is the constructor for the SecretsMgr

func (*SecretsMgr) DecryptPadlFileSecrets

func (smgr *SecretsMgr) DecryptPadlFileSecrets(userPriv *rsa.PrivateKey) (map[string]string, error)

DecryptPadlFileSecrets uses the network and the file system to decrypt the contents of a padlfile

func (*SecretsMgr) DecryptSecret

func (smgr *SecretsMgr) DecryptSecret(ciphertext string, usrOrSvcPriv *rsa.PrivateKey) (string, error)

DecryptSecret ecrypts a single pem encoded secret

func (*SecretsMgr) EncryptPadlfileSecrets

func (smgr *SecretsMgr) EncryptPadlfileSecrets() (map[string]string, error)

EncryptPadlfileSecrets uses the network and the file system to encrypt the contents of a padlfile

func (*SecretsMgr) EncryptSecret

func (smgr *SecretsMgr) EncryptSecret(plaintext string) (string, error)

EncryptSecret encrypts a single secret

func (*SecretsMgr) PrecachePubs

func (smgr *SecretsMgr) PrecachePubs() (map[string]*rsa.PublicKey, error)

PrecachePubs gets (and caches) all public keys needed to encrypt a padlfile

Jump to

Keyboard shortcuts

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