content

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 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 LegacyEncryptedContentService

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

func NewLegacyEncryptedContentService

func NewLegacyEncryptedContentService(
	base64Service base64Service,
	aesService aesService,
) *LegacyEncryptedContentService

func (*LegacyEncryptedContentService) Decrypt

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

func (LegacyEncryptedContentService) Deserialize

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

func (*LegacyEncryptedContentService) Encrypt

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

func (LegacyEncryptedContentService) Serialize

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

type V1EncryptedContentService

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

func NewV1EncryptedContentService

func NewV1EncryptedContentService(base64Service base64Service, aesService aesService) *V1EncryptedContentService

func (*V1EncryptedContentService) Decrypt

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

func (V1EncryptedContentService) Deserialize

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

func (*V1EncryptedContentService) Encrypt

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

func (V1EncryptedContentService) Serialize

func (s V1EncryptedContentService) 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