secret

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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