aes

package
v3.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package aes defines a Cipher that uses 256-bit AES-GCM authenticated encryption to encrypt values the SOPS tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

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

Cipher encrypts and decrypts data keys with AES GCM 256

func NewCipher

func NewCipher() Cipher

NewCipher is the constructor for a new Cipher object

func (Cipher) Decrypt

func (c Cipher) Decrypt(ciphertext string, key []byte, additionalData string) (plaintext interface{}, err error)

Decrypt takes a sops-format value string and a key and returns the decrypted value and a stash value

func (Cipher) Encrypt

func (c Cipher) Encrypt(plaintext interface{}, key []byte, additionalData string) (ciphertext string, err error)

Encrypt takes one of (string, int, float, bool) and encrypts it with the provided key and additional auth data, returning a sops-format encrypted string.

Jump to

Keyboard shortcuts

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