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

package decrypt

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

Package decrypt is the external API other Go programs can use to decrypt SOPS files. It is the only package in SOPS with a stable API.

Index

Package Files

decrypt.go

func Data Uses

func Data(data []byte, format string) (cleartext []byte, err error)

Data is a helper that takes encrypted data and a format string, decrypts the data and returns its cleartext in an []byte. The format string can be `json`, `yaml`, `ini`, `dotenv` or `binary`. If the format string is empty, binary format is assumed.

func DataWithFormat Uses

func DataWithFormat(data []byte, format Format) (cleartext []byte, err error)

DataWithFormat is a helper that takes encrypted data, and a format enum value, decrypts the data and returns its cleartext in an []byte.

func File Uses

func File(path, format string) (cleartext []byte, err error)

File is a wrapper around Data that reads a local encrypted file and returns its cleartext data in an []byte

Package decrypt imports 6 packages (graph) and is imported by 10 packages. Updated 2020-04-09. Refresh now. Tools for package owners.