aes

package
Version: v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MPL-2.0 Imports: 11 Imported by: 4

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto