math/big.Int.SetBytes (method)
43 uses
math/big (current package)
int.go#L601: func (z *Int) SetBytes(buf []byte) *Int {
crypto/dsa
dsa.go#L111: q.SetBytes(qBytes)
dsa.go#L125: p.SetBytes(pBytes)
dsa.go#L181: x.SetBytes(xBytes)
dsa.go#L243: k.SetBytes(buf)
dsa.go#L262: z := k.SetBytes(hash)
dsa.go#L317: z := new(big.Int).SetBytes(hash)
crypto/ecdsa
ecdsa.go#L578: return &PrivateKey{PublicKey: *pub, D: new(big.Int).SetBytes(priv.Bytes())}, nil
ecdsa.go#L646: x = new(big.Int).SetBytes(p[1 : 1+byteLen])
ecdsa.go#L647: y = new(big.Int).SetBytes(p[1+byteLen:])
ecdsa_legacy.go#L49: ret := new(big.Int).SetBytes(hash)
ecdsa_legacy.go#L169: r, s := new(big.Int).SetBytes(rBytes), new(big.Int).SetBytes(sBytes)
ecdsa_legacy.go#L215: k = new(big.Int).SetBytes(b)
crypto/elliptic
elliptic.go#L94: if new(big.Int).SetBytes(priv).Cmp(N) >= 0 {
elliptic.go#L166: x = new(big.Int).SetBytes(data[1 : 1+byteLen])
elliptic.go#L167: y = new(big.Int).SetBytes(data[1+byteLen:])
elliptic.go#L193: x = new(big.Int).SetBytes(data[1:])
nistec.go#L165: x = new(big.Int).SetBytes(out[1 : 1+byteLen])
nistec.go#L166: y = new(big.Int).SetBytes(out[1+byteLen:])
nistec.go#L197: s := new(big.Int).SetBytes(scalar)
nistec.go#L240: x = new(big.Int).SetBytes(data[1 : 1+byteLen])
nistec.go#L241: y = new(big.Int).SetBytes(data[1+byteLen:])
crypto/rand
util.go#L62: p.SetBytes(bytes)
util.go#L103: n.SetBytes(bytes)
crypto/rsa
rsa.go#L393: N: new(big.Int).SetBytes(N),
rsa.go#L396: D: new(big.Int).SetBytes(d),
rsa.go#L398: new(big.Int).SetBytes(p),
rsa.go#L399: new(big.Int).SetBytes(q),
rsa.go#L403: Dp: new(big.Int).SetBytes(dP),
rsa.go#L404: Dq: new(big.Int).SetBytes(dQ),
rsa.go#L405: Qinv: new(big.Int).SetBytes(qInv),
rsa.go#L622: precomputed.Dp = new(big.Int).SetBytes(dP)
rsa.go#L623: precomputed.Dq = new(big.Int).SetBytes(dQ)
rsa.go#L624: precomputed.Qinv = new(big.Int).SetBytes(qInv)
crypto/x509
x509.go#L1827: serialNumber = new(big.Int).SetBytes(serialBytes)
encoding/asn1
asn1.go#L149: ret.SetBytes(notBytes)
asn1.go#L154: ret.SetBytes(bytes)
golang.org/x/tools/internal/gcimporter
iexport.go#L1349: return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes))
iimport.go#L759: x.SetBytes(b)
golang.org/x/tools/internal/pkgbits
decoder.go#L462: v := new(big.Int).SetBytes([]byte(r.String()))
vendor/golang.org/x/crypto/cryptobyte
asn1.go#L326: out.SetBytes(neg)
asn1.go#L330: out.SetBytes(bytes)