v3: go.mozilla.org/sops/v3/aes Index | Files

package aes

import "go.mozilla.org/sops/v3/aes"

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

Index

Package Files

cipher.go

type Cipher Uses

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

Cipher encrypts and decrypts data keys with AES GCM 256

func NewCipher Uses

func NewCipher() Cipher

NewCipher is the constructor for a new Cipher object

func (Cipher) Decrypt Uses

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 Uses

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.

Package aes imports 11 packages (graph) and is imported by 2 packages. Updated 2020-04-22. Refresh now. Tools for package owners.