math/big.Int.Bytes (method)
37 uses
math/big (current package)
int.go#L520: func (x *Int) Bytes() []byte {
crypto/ecdsa
ecdsa.go#L133: return subtle.ConstantTimeCompare(a.Bytes(), b.Bytes()) == 1
ecdsa.go#L409: return ecdsa.NewPrivateKey(c, priv.D.Bytes(), Q)
ecdsa_legacy.go#L35: priv.PublicKey.X, priv.PublicKey.Y = c.ScalarBaseMult(k.Bytes())
ecdsa_legacy.go#L95: for i, b := range priv.D.Bytes() {
ecdsa_legacy.go#L118: r, _ = c.ScalarBaseMult(k.Bytes())
ecdsa_legacy.go#L135: return encodeSignature(r.Bytes(), s.Bytes())
ecdsa_legacy.go#L148: sig, err := encodeSignature(r.Bytes(), s.Bytes())
ecdsa_legacy.go#L185: x1, y1 := c.ScalarBaseMult(u1.Bytes())
ecdsa_legacy.go#L186: x2, y2 := c.ScalarMult(pub.X, pub.Y, u2.Bytes())
crypto/rsa
rsa.go#L147: return subtle.ConstantTimeCompare(a.Bytes(), b.Bytes()) == 1
rsa.go#L542: k, err := rsa.NewPrivateKeyWithPrecomputation(priv.N.Bytes(), priv.E, priv.D.Bytes(),
rsa.go#L543: priv.Primes[0].Bytes(), priv.Primes[1].Bytes(),
rsa.go#L544: priv.Precomputed.Dp.Bytes(), priv.Precomputed.Dq.Bytes(), priv.Precomputed.Qinv.Bytes())
rsa.go#L554: k, err := rsa.NewPrivateKey(priv.N.Bytes(), priv.E, priv.D.Bytes(),
rsa.go#L555: priv.Primes[0].Bytes(), priv.Primes[1].Bytes())
rsa.go#L572: k, err := rsa.NewPrivateKeyWithoutCRT(priv.N.Bytes(), priv.E, priv.D.Bytes())
rsa.go#L625: N, err := bigmod.NewModulus(pub.N.Bytes())
crypto/x509
x509.go#L1691: if serialBytes := serialNumber.Bytes(); len(serialBytes) > 0 && (len(serialBytes) < 20 || serialBytes[0]&0x80 == 0) {
x509.go#L2483: if numBytes := template.Number.Bytes(); len(numBytes) > 20 || (len(numBytes) == 20 && numBytes[0]&0x80 != 0) {
encoding/asn1
marshal.go#L207: bytes := nMinus1.Bytes()
marshal.go#L219: bytes := n.Bytes()
golang.org/x/tools/internal/gcimporter
iexport.go#L1405: b := x.Bytes()
golang.org/x/tools/internal/pkgbits
encoder.go#L381: b := v.Bytes()
vendor/golang.org/x/crypto/cryptobyte
asn1.go#L80: bytes := nMinus1.Bytes()
asn1.go#L91: bytes := n.Bytes()