Documentation ¶
Index ¶
- type JSON
- type KeyPair
- func (k *KeyPair) GetID() (peer.ID, error)
- func (k *KeyPair) GetPrivateKey() p2pCrypto.PrivKey
- func (k *KeyPair) GetPublicKey() p2pCrypto.PubKey
- func (k *KeyPair) SaveToFile(fileName string) (bool, error)
- func (k *KeyPair) Sign(data []byte) (signature []byte, err error)
- func (k *KeyPair) Verify(data []byte, signature []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
type KeyPair struct {
// contains filtered or unexported fields
}
KeyPair structure
func FromPrivKey ¶
FromPrivKey restore key pair in base64
func FromPubKey ¶
FromPubKey restore key pair in base64, this is verify only
func LoadFromFile ¶
LoadFromFile save key pair to file
func (*KeyPair) GetPrivateKey ¶
GetPrivateKey of this key pair
func (*KeyPair) GetPublicKey ¶
GetPublicKey of this key pair
func (*KeyPair) SaveToFile ¶
SaveToFile save key pair to file
Click to show internal directories.
Click to hide internal directories.