secret

package
v4.2.2-alpha.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package secret implements a authenticated encryption with associated data (AEAD) cipher to be used when symmetric is required in Teleport. The underlying cipher is AES-GCM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key []byte

Key for the symmetric cipher.

func NewKey

func NewKey() (Key, error)

NewKey generates a new key from a cryptographically secure pseudo-random number generator (CSPRNG).

func ParseKey

func ParseKey(k []byte) (Key, error)

ParseKey reads in an existing hex encoded key.

func (Key) Open

func (k Key) Open(ciphertext []byte) ([]byte, error)

Open will authenticate then decrypt the ciphertext.

func (Key) Seal

func (k Key) Seal(plaintext []byte) ([]byte, error)

Seal will encrypt then authenticate the ciphertext.

func (Key) String

func (k Key) String() string

String returns the human-readable representation of the key.

Jump to

Keyboard shortcuts

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