func (k *KeyManager) CreateAndExportPubKeyBytes(kt kmsservice.KeyType) (string, []byte, error) {
	if k.CrAndExportPubKeyErr != nil {
		return "", nil, k.CrAndExportPubKeyErr
	}
	return k.CrAndExportPubKeyID, k.CrAndExportPubKeyValue, nil
}
CreateAndExportPubKeyBytes return a mocked kid and []byte public key.
package kms
import (
	"fmt"
	"github.com/golang/protobuf/proto"
	"github.com/google/tink/go/keyset"
	tinkpb "github.com/google/tink/go/proto/tink_go_proto"
	"github.com/google/tink/go/testkeyset"
	"github.com/google/tink/go/testutil"
	kmsservice "github.com/hyperledger/aries-framework-go/pkg/kms"
	"github.com/hyperledger/aries-framework-go/pkg/secretlock"
	"github.com/hyperledger/aries-framework-go/spi/storage"
)
type KeyManager struct {
	CreateKeyID              string
	CreateKeyValue           *keyset.Handle
	CreateKeyErr             error
	CreateKeyFn              func(kt kmsservice.KeyType) (string, interface{}, error)
	GetKeyValue              *keyset.Handle
	GetKeyErr                error
	RotateKeyID              string
	RotateKeyValue           *keyset.Handle
	RotateKeyErr             error
	ExportPubKeyBytesErr     error
	ExportPubKeyBytesValue   []byte
	CrAndExportPubKeyValue   []byte
	CrAndExportPubKeyID      string
	CrAndExportPubKeyErr     error
	PubKeyBytesToHandleErr   error
	PubKeyBytesToHandleValue *keyset.Handle
	ImportPrivateKeyErr      error
	ImportPrivateKeyID       string
	ImportPrivateKeyValue    *keyset.Handle
}
func (k *KeyManager) Create(kt kmsservice.KeyType) (string, interface{}, error) {
	if k.CreateKeyErr != nil {
		return "", nil, k.CreateKeyErr
	}
	if k.CreateKeyFn != nil {
		return k.CreateKeyFn(kt)
	}
	return k.CreateKeyID, k.CreateKeyValue, nil
}
func (k *KeyManager) Get(keyID string) (interface{}, error) {
	if k.GetKeyErr != nil {
		return nil, k.GetKeyErr
	}
	return k.GetKeyValue, nil
}
func (k *KeyManager) Rotate(kt kmsservice.KeyType, keyID string) (string, interface{}, error) {
	if k.RotateKeyErr != nil {
		return "", nil, k.RotateKeyErr
	}
	return k.RotateKeyID, k.RotateKeyValue, nil
}
func (k *KeyManager) ExportPubKeyBytes(keyID string) ([]byte, error) {
	if k.ExportPubKeyBytesErr != nil {
		return nil, k.ExportPubKeyBytesErr
	}
	return k.ExportPubKeyBytesValue, nil
}