7 ci "github.com/libp2p/go-libp2p-crypto"
10 func RandTestKeyPair(typ, bits int) (ci.PrivKey, ci.PubKey, error) {
11 return SeededTestKeyPair(typ, bits, time.Now().UnixNano())
14 func SeededTestKeyPair(typ, bits int, seed int64) (ci.PrivKey, ci.PubKey, error) {
15 r := rand.New(rand.NewSource(seed))
16 return ci.GenerateKeyPairWithReader(typ, bits, r)