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 ¶ added in v2.1.0
func CreateLibp2pPeerIdWithPrivateKey(privateKey crypto.PrivateKey) (string, error)
CreateLibp2pPeerIdWithPrivateKey create a peer.ID with crypto.PrivateKey.
func CreateLibp2pPeerIdWithPublicKey ¶ added in v2.1.0
CreateLibp2pPeerIdWithPublicKey create a peer.ID with crypto.PublicKey.
func GetLibp2pPeerIdFromCert ¶
GetLibp2pPeerIdFromCert create a peer.ID with pubKey that contains in cert.
func GetLibp2pPeerIdFromCertDer ¶ added in v2.1.0
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.
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.