Documentation
¶
Index ¶
- Constants
- type EncryptedPayload
- type EncryptedPayloadService
- func (s *EncryptedPayloadService) Decrypt(privateKey *rsa.PrivateKey, encryptedPayload *EncryptedPayload) (*Payload, error)
- func (s *EncryptedPayloadService) Deserialize(encodedContent []byte) (*EncryptedPayload, error)
- func (s *EncryptedPayloadService) Encrypt(publicKey *rsa.PublicKey, payload *Payload) (*EncryptedPayload, error)
- func (s *EncryptedPayloadService) Serialize(encryptedPayload *EncryptedPayload) ([]byte, error)
- type Payload
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.