func (e EncryptedData) MarshalBinary() ([]byte, error) {
	buf := bytes.Buffer{}
	enc := gob.NewEncoder(&buf)
	if err := enc.Encode(e.Ciphertext); err != nil {
		return nil, err
	}
	if err := enc.Encode(e.HMAC); err != nil {
		return nil, err
	}
	if err := enc.Encode(e.Type); err != nil {
		return nil, err
	}
	if err := enc.Encode(e.Context); err != nil {
		return nil, err
	}
	return buf.Bytes(), nil
}
MarshalBinary returns the EncryptedData struct encoded into a slice of bytes
using Gob.
package encryptor
import (
	"bytes"
	"encoding/gob"
)
type EncryptedData struct {
	Ciphertext []byte
	HMAC       []byte
	Type       uint8
	Context    map[string]interface{}
}
func init() {
	gob.Register(kdfParameters{})
}