]> Cypherpunks repositories - gostls13.git/commit
crypto/{aes,cipher,rand}: use binary.{Big,Little}Endian methods
authorMichael Munday <mike.munday@ibm.com>
Thu, 31 May 2018 12:06:27 +0000 (13:06 +0100)
committerMichael Munday <mike.munday@ibm.com>
Tue, 21 Aug 2018 16:15:16 +0000 (16:15 +0000)
commit4a842f25590fca15a8c564ec6a8edfd9f71bc446
tree8220f29e37359554efdb250a936415d108924610
parent3649fe299d452b11a8a458096deda38ed9df5947
crypto/{aes,cipher,rand}: use binary.{Big,Little}Endian methods

Use the binary.{Big,Little}Endian integer encoding methods rather
than unsafe or local implementations. These methods are tested to
ensure they inline correctly and don't add unnecessary bounds checks,
so it seems better to use them wherever possible.

This introduces a dependency on encoding/binary to crypto/cipher. I
think this is OK because other "L3" packages already import
encoding/binary.

Change-Id: I5cf01800d08554ca364e46cfc1d9445cf3c711a0
Reviewed-on: https://go-review.googlesource.com/115555
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/aes/block.go
src/crypto/aes/ctr_s390x.go
src/crypto/aes/gcm_s390x.go
src/crypto/cipher/gcm.go
src/crypto/rand/rand_unix.go
src/go/build/deps_test.go