remove commented code
This commit is contained in:
11
su3/su3.go
11
su3/su3.go
@@ -3,8 +3,7 @@ package su3
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
crypto_rand "crypto/rand"
|
||||
//math_rand "math/rand"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/binary"
|
||||
@@ -54,13 +53,7 @@ type Su3File struct {
|
||||
}
|
||||
|
||||
func NewSu3File() *Su3File {
|
||||
|
||||
// added 6h random time delta to increase Anonymity
|
||||
//rr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
//now := time.Now().Unix() - rr.Int63n(60*60*6)
|
||||
|
||||
return &Su3File{
|
||||
//Version: []byte(strconv.FormatInt(now, 10)),
|
||||
Version: []byte(strconv.FormatInt(time.Now().Unix(), 10)),
|
||||
SignatureType: SIGTYPE_RSA_SHA512,
|
||||
}
|
||||
@@ -85,7 +78,7 @@ func (s *Su3File) Sign(privkey *rsa.PrivateKey) error {
|
||||
h.Write(s.BodyBytes())
|
||||
digest := h.Sum(nil)
|
||||
|
||||
sig, err := rsa.SignPKCS1v15(crypto_rand.Reader, privkey, 0, digest)
|
||||
sig, err := rsa.SignPKCS1v15(rand.Reader, privkey, 0, digest)
|
||||
if nil != err {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user