payload

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncryptionPayloadSeparator = "::"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedPayload

type EncryptedPayload struct {
	Header              *header.Header
	EncryptedPassphrase *passphrase.EncryptedPassphrase
	EncryptedContent    *content.EncryptedContent
}

func NewEncryptedPayload

func NewEncryptedPayload(
	header *header.Header,
	encryptedPassphrase *passphrase.EncryptedPassphrase,
	encryptedContent *content.EncryptedContent,
) *EncryptedPayload

type EncryptedPayloadService

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

func NewEncryptedPayloadService

func NewEncryptedPayloadService(
	headerService headerService,
	encryptedPassphraseService encryptedPassphraseService,
	encryptedContentService encryptedContentService,
) *EncryptedPayloadService

func (*EncryptedPayloadService) Decrypt

func (s *EncryptedPayloadService) Decrypt(
	privateKey *rsa.PrivateKey,
	encryptedPayload *EncryptedPayload,
) (*Payload, error)

func (*EncryptedPayloadService) Deserialize

func (s *EncryptedPayloadService) Deserialize(encodedContent []byte) (*EncryptedPayload, error)

func (*EncryptedPayloadService) Encrypt

func (s *EncryptedPayloadService) Encrypt(publicKey *rsa.PublicKey, payload *Payload) (*EncryptedPayload, error)

func (*EncryptedPayloadService) Serialize

func (s *EncryptedPayloadService) Serialize(encryptedPayload *EncryptedPayload) ([]byte, error)

type Payload

type Payload struct {
	Header     *header.Header
	Passphrase *passphrase.Passphrase
	Content    *content.Content
}

func NewPayload

func NewPayload(
	header *header.Header,
	passphrase *passphrase.Passphrase,
	content *content.Content,
) *Payload

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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