func (p *PublicKey) Bytes() []byte {
	if p != nil {
		return p.pub
	}
	return nil
}
Bytes returns the public key as byte array.
package signing
import (
	"bytes"
	"errors"
	"fmt"
	"github.com/spacemeshos/ed25519"
	"github.com/spacemeshos/go-spacemesh/common/util"
	"github.com/spacemeshos/go-spacemesh/log"
)
const shortStringSize = 5
type PublicKey struct {
	pub []byte
}
func NewPublicKey(pub []byte) *PublicKey {
	return &PublicKey{pub}
}
func (p *PublicKey) Field() log.Field {
	return log.String("public_key", p.ShortString())
}