func (k *Key) Marshal() []byte {
	return k.Blob
}
Marshal returns key blob to satisfy the ssh.PublicKey interface.
package agent
import (
	"bytes"
	"crypto/dsa"
	"crypto/ecdsa"
	"crypto/elliptic"
	"crypto/rsa"
	"encoding/base64"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"math/big"
	"sync"
	"golang.org/x/crypto/ed25519"
	"golang.org/x/crypto/ssh"
)
type Agent interface {
	List() ([]*Key, error)
	Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)
	Add(key AddedKey) error
	Remove(key ssh.PublicKey) error
	RemoveAll() error
	Lock(passphrase []byte) error
	Unlock(passphrase []byte) error
	Signers() ([]ssh.Signer, error)
}
type AddedKey struct {
	PrivateKey interface{}
	Certificate *ssh.Certificate
	Comment string
	LifetimeSecs uint32
	ConfirmBeforeUse bool
}
const (
	agentRequestV1Identities   = 1
	agentRemoveAllV1Identities = 9
	agentAddIdentity         = 17
	agentRemoveIdentity      = 18
	agentRemoveAllIdentities = 19
	agentAddIdConstrained    = 25
	agentAddSmartcardKey            = 20
	agentRemoveSmartcardKey         = 21
	agentLock                       = 22
	agentUnlock                     = 23
	agentAddSmartcardKeyConstrained = 26
	agentConstrainLifetime = 1
	agentConstrainConfirm  = 2
)
const maxAgentResponseBytes = 16 << 20
const agentFailure = 5
type failureAgentMsg struct{}
const agentSuccess = 6
type successAgentMsg struct{}
const agentRequestIdentities = 11
type requestIdentitiesAgentMsg struct{}
const agentIdentitiesAnswer = 12
type identitiesAnswerAgentMsg struct {
	NumKeys uint32 `sshtype:"12"`
	Keys    []byte `ssh:"rest"`
}
const agentSignRequest = 13
type signRequestAgentMsg struct {
	KeyBlob []byte `sshtype:"13"`
	Data    []byte
	Flags   uint32
}
const agentSignResponse = 14
type signResponseAgentMsg struct {
	SigBlob []byte `sshtype:"14"`
}
type publicKey struct {
	Format string
	Rest   []byte `ssh:"rest"`
}
type Key struct {
	Format  string
	Blob    []byte
	Comment string
}
func clientErr(err error) error {
	return fmt.Errorf("agent: client error: %v", err)
}
func (k *Key) String() string {
	s := string(k.Format) + " " + base64.StdEncoding.EncodeToString(k.Blob)
	if k.Comment != "" {
		s += " " + k.Comment
	}
	return s
}
func (k *Key) Type() string {
	return k.Format
}