Documentation ¶
Index ¶
- func CreateLibp2pPeerIdWithPrivateKey(privateKey crypto.PrivateKey) (string, error)
- func CreateLibp2pPeerIdWithPublicKey(publicKey crypto.PublicKey) (string, error)
- func GetLibp2pPeerIdFromCert(certPemBytes []byte) (string, error)
- func GetLibp2pPeerIdFromCertDer(certDerBytes []byte) (string, error)
- func GetNodeUidFromAddr(addr string) (string, error)
- func P2pAddressFormatVerify(address string) bool
- func ParseGoPublicKeyToPubKey(publicKey goCrypto.PublicKey) (libp2pcrypto.PubKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLibp2pPeerIdWithPrivateKey ¶
func CreateLibp2pPeerIdWithPrivateKey(privateKey crypto.PrivateKey) (string, error)
CreateLibp2pPeerIdWithPrivateKey create a peer.ID with crypto.PrivateKey.
func CreateLibp2pPeerIdWithPublicKey ¶
CreateLibp2pPeerIdWithPublicKey create a peer.ID with crypto.PublicKey.
func GetLibp2pPeerIdFromCert ¶
GetLibp2pPeerIdFromCert create a peer.ID with pubKey that contains in cert.
func GetLibp2pPeerIdFromCertDer ¶
GetLibp2pPeerIdFromCertDer create a peer.ID with pubKey that contains in cert.
func GetNodeUidFromAddr ¶
GetNodeUidFromAddr get the unique id of node from an addr. 从地址中截取出节点ID
func P2pAddressFormatVerify ¶
P2pAddressFormatVerify verify a node address format.
func ParseGoPublicKeyToPubKey ¶
func ParseGoPublicKeyToPubKey(publicKey goCrypto.PublicKey) (libp2pcrypto.PubKey, error)
ParseGoPublicKeyToPubKey parse a go crypto PublicKey to a libp2p crypto PubKey.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package crypto implements various cryptographic utilities used by libp2p.
|
Package crypto implements various cryptographic utilities used by libp2p. |
Click to show internal directories.
Click to hide internal directories.