func (k *SerializedKeys) Marshal() ([]byte, error) {
	return json.Marshal(k)
}
Marshal serializes master key into a byte buffer.
package keystore
import (
	"crypto/subtle"
	"encoding/base64"
	"encoding/json"
	"errors"
	"os"
	keystoreV1 "github.com/cossacklabs/acra/keystore"
	"github.com/cossacklabs/acra/keystore/v2/keystore/crypto"
	log "github.com/sirupsen/logrus"
)
var (
	ErrEqualMasterKeys = errors.New("encryption and signature master keys are equal")
)
type SerializedKeys struct {
	Encryption []byte `json:"encryption"`
	Signature  []byte `json:"signature"`
}
func NewMasterKeys() (*SerializedKeys, error) {
	encryptionKey, err := keystoreV1.GenerateSymmetricKey()
	if err != nil {
		return nil, err
	}
	signatureKey, err := keystoreV1.GenerateSymmetricKey()
	if err != nil {
		return nil, err
	}
	return &SerializedKeys{Encryption: encryptionKey, Signature: signatureKey}, nil
}
func NewSerializedMasterKeys() ([]byte, error) {
	keys, err := NewMasterKeys()
	if err != nil {
		return nil, err
	}
	bytes, err := keys.Marshal()
	if err != nil {
		return nil, err
	}
	return bytes, nil
}