content

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Plaintext []byte
}

func NewContent

func NewContent(plaintext []byte) *Content

type EncryptedContent

type EncryptedContent struct {
	Ciphertext []byte
}

func NewEncryptedContent

func NewEncryptedContent(ciphertext []byte) *EncryptedContent

type V1Service added in v0.3.0

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

func NewV1Service added in v0.3.0

func NewV1Service(base64Service base64Service, aesService aesService) *V1Service

func (*V1Service) Decrypt added in v0.3.0

func (s *V1Service) Decrypt(
	passphrase *passphrase.Passphrase,
	encryptedContent *EncryptedContent,
) (*Content, error)

func (V1Service) Deserialize added in v0.3.0

func (s V1Service) Deserialize(encoded []byte) (*EncryptedContent, error)

func (*V1Service) Encrypt added in v0.3.0

func (s *V1Service) Encrypt(
	passphrase *passphrase.Passphrase,
	content *Content,
) (*EncryptedContent, error)

func (V1Service) Serialize added in v0.3.0

func (s V1Service) Serialize(encryptedContent *EncryptedContent) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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