package
0.0.0-20230116212949-c94e5b33ee62
Repository: https://github.com/tcfw/ocs.git
Documentation: pkg.go.dev

# Functions

MarshalEFF writes a EFF file given a Header and cipher text.
NewHeader creates a new header and ephemeral key using a designated signing key (from) andan intended recipient key (to).
NewHeaderWithOptions creates a new header with a specific set of options applied using adesignated signing key (from) and an intended recipient key (to).
ParseEFF reads a EFF file and returns the header.
ParseHeader unmarshals in a msgpack encoded header.
WithEmbeddedCerts specifies which certificates to include in the headercertificates are parsed to ensure validity.
WithEncryptionAlgo specifies which encryption (AEAD) algorithm to use.
WithEphemeral creates a new ephemeral key pair based off the given algorithm.

# Constants

AES256GCM AES 256 bit GCM mode.
ChaCha20Poly1305 ChaCha20 with Poly1305 MAC.
Magic number used for file signature/identification.
UnknownAlgo unknown or not set.

# Variables

ErrBadCertificate bad certificate.
ErrBadSignature bad signature.
ErrInvalidAlgo invalid algorithm.
ErrInvalidHeader invalid header.
ErrInvalidPublicKey invalid public key.
ErrNoMatchingCertificates no matching certificates.

# Structs

Header representation of a OCS EPF Header.

# Type aliases

Algorithm EFF AEAD encryption algorithm.
HeaderOption header creation option.