mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 12:57:44 +08:00
RandPeerID generates random "valid" peer IDs. it does not NEED to generate keys because it is as if we lost the key right away. fine to read some randomness and hash it. to generate proper keys and an ID, use: sk, pk, _ := testutil.RandKeyPair() id, _ := peer.IDFromPublicKey(pk) Also added RandPeerIDFatal helper |
||
|---|---|---|
| .. | ||
| gen.go | ||
| rand.go | ||