aboutsummaryrefslogtreecommitdiff
path: root/peer/messages.go
diff options
context:
space:
mode:
Diffstat (limited to 'peer/messages.go')
-rw-r--r--peer/messages.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/peer/messages.go b/peer/messages.go
index 1ddaf83..a14de46 100644
--- a/peer/messages.go
+++ b/peer/messages.go
@@ -1,11 +1,5 @@
package peer
-import (
- "crypto/rand"
- "fmt"
- "math/big"
-)
-
type Message int
const (
@@ -23,12 +17,3 @@ const (
)
const Proto = `BitTorrent protocol`
-
-func NewID() (string, error) {
- limit := new(big.Int).Lsh(big.NewInt(1), 80)
- id, err := rand.Int(rand.Reader, limit)
- if err != nil {
- return "", err
- }
- return fmt.Sprintf("%0.20x", id), nil
-}