]> Cypherpunks repositories - gostls13.git/commit
math/big: add (*Int).FillBytes
authorFilippo Valsorda <filippo@golang.org>
Tue, 28 Apr 2020 01:52:38 +0000 (21:52 -0400)
committerFilippo Valsorda <filippo@golang.org>
Tue, 5 May 2020 00:36:44 +0000 (00:36 +0000)
commitc9d5f60eaa4450ccf1ce878d55b4c6a12843f2f3
tree099593dca9e78212c29c48640fe0427c24f9e31c
parentb5f7ff4aa9c1fef6437f350595caae4ee4b5708d
math/big: add (*Int).FillBytes

Replaced almost every use of Bytes with FillBytes.

Note that the approved proposal was for

    func (*Int) FillBytes(buf []byte)

while this implements

    func (*Int) FillBytes(buf []byte) []byte

because the latter was far nicer to use in all callsites.

Fixes #35833

Change-Id: Ia912df123e5d79b763845312ea3d9a8051343c0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/230397
Reviewed-by: Robert Griesemer <gri@golang.org>
src/crypto/elliptic/elliptic.go
src/crypto/rsa/pkcs1v15.go
src/crypto/rsa/pss.go
src/crypto/rsa/rsa.go
src/crypto/tls/key_schedule.go
src/crypto/x509/sec1.go
src/math/big/int.go
src/math/big/int_test.go
src/math/big/nat.go