func hashToInt(hash []byte, c elliptic.Curve) *big.Int {
	var hashClone = make([]byte, len(hash))
	copy(hashClone, hash)

	orderBits := c.Params().N.BitLen()
	orderBytes := (orderBits + 7) / 8
	if len(hashClone) > orderBytes {
		hashClone = hashClone[:orderBytes]
	}

	ret := new(big.Int).SetBytes(hashClone)
	excess := len(hashClone)*8 - orderBits
	if excess > 0 {
		ret.Rsh(ret, uint(excess))
	}
	return ret
}
// copied from crypto/ecdsa
copied from crypto/ecdsa
// copied from crypto / ecdsa
func hashToInt(hash []byte, c elliptic.Curve) *big.Int {
	var hashClone = make([]byte, len(hash))
	copy(hashClone, hash)
	orderBits := c.Params().N.BitLen()
	orderBytes := (orderBits + 7) / 8
	if len(hashClone) > orderBytes {
		hashClone = hashClone[:orderBytes]
	}
	ret := new(big.Int).SetBytes(hashClone)
	excess := len(hashClone)*8 - orderBits
	if excess > 0 {
		ret.Rsh(ret, uint(excess))
	}
	return ret
}
func hashToInt ( hash [ ] byte , c elliptic . Curve ) * big . Int { var hashClone = make ( [ ] byte , len ( hash ) ) copy ( hashClone , hash ) orderBits := c . Params ( ) . N . BitLen ( ) orderBytes := ( orderBits + 7 ) / 8 if len ( hashClone ) > orderBytes { hashClone = hashClone [ : orderBytes ] } ret := new ( big . Int ) . SetBytes ( hashClone ) excess := len ( hashClone ) * 8 - orderBits if excess > 0 { ret . Rsh ( ret , uint ( excess ) ) } return ret }
copied from crypto/ecdsa
copied from crypto / ecdsa