crypt

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: EUPL-1.2 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptFromStdin

func DecryptFromStdin(privateKeys []string, paasName string) error

func EncryptFile

func EncryptFile(publicKey string, paasName string, path string) error

func EncryptFromStdin

func EncryptFromStdin(publicKey string, paasName string) error

func GenerateKeyPair

func GenerateKeyPair(privateKey string, publicKey string) error

func NewPrivateKey added in v0.6.1

func NewPrivateKey(privateKeyPath string) (*cryptPrivateKey, error)

Types

type Crypt

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

func NewCrypt

func NewCrypt(privateKeyPaths []string, publicKeyPath string, encryptionContext string) (*Crypt, error)

func NewGeneratedCrypt added in v0.6.1

func NewGeneratedCrypt(privateKeyPath string, publicKeyPath string) (*Crypt, error)

func (Crypt) Decrypt

func (c Crypt) Decrypt(b64 string) ([]byte, error)

func (*Crypt) DecryptRsa

func (c *Crypt) DecryptRsa(data []byte) (decryptedBytes []byte, err error)

func (*Crypt) Encrypt

func (c *Crypt) Encrypt(secret []byte) (encrypted string, err error)

func (*Crypt) EncryptRsa

func (c *Crypt) EncryptRsa(secret []byte) (encryptedBytes []byte, err error)

Jump to

Keyboard shortcuts

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