envelope

package
v0.0.0-...-16ade8c Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ph1key []byte, encryptedContainer []byte) (result []byte, err error)

Types

type BlockEncrypter

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

func NewBlockCipher

func NewBlockCipher(cipherName string, blockSize int, blockMode string) (result *BlockEncrypter, err error)

func (*BlockEncrypter) MarshalCBOR

func (m *BlockEncrypter) MarshalCBOR() (data []byte, err error)

func (*BlockEncrypter) UnmarshalCBOR

func (m *BlockEncrypter) UnmarshalCBOR(data []byte) (err error)

type Encrypter

type Encrypter interface {
	MarshalCBOR() (data []byte, err error)
	UnmarshalCBOR(data []byte) (err error)
	// contains filtered or unexported methods
}

type Envelope

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

func NewEnvelope

func NewEnvelope(ph1 string) (result Envelope, err error)

func (*Envelope) Encrypt

func (envelope *Envelope) Encrypt(ph1key []byte, ph2 string, data []byte) (result []byte, err error)

func (*Envelope) MarshalCBOR

func (m *Envelope) MarshalCBOR() (data []byte, err error)

func (*Envelope) UnmarshalCBOR

func (m *Envelope) UnmarshalCBOR(data []byte) (err error)

Jump to

Keyboard shortcuts

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