diff options
| author | Russ Cox <rsc@golang.org> | 2022-08-16 10:50:35 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-08-17 18:46:05 +0000 |
| commit | 90466e1ddf0e4305bc56f6eac61a690704e6fab8 (patch) | |
| tree | 109c79b860612e733665fdfc958112dee17d0e25 /src/crypto/cipher | |
| parent | ebda5a73fa0a96f6f1a1d468f86284e5654f5ee8 (diff) | |
| download | go-90466e1ddf0e4305bc56f6eac61a690704e6fab8.tar.xz | |
crypto/internal/subtle: rename to crypto/internal/alias
This avoids an import conflict with crypto/subtle.
CL 424175 does the same for x/crypto.
Change-Id: Id4a319b3283b8affaaf769062388325b31fe1715
Reviewed-on: https://go-review.googlesource.com/c/go/+/424194
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/crypto/cipher')
| -rw-r--r-- | src/crypto/cipher/cbc.go | 6 | ||||
| -rw-r--r-- | src/crypto/cipher/cfb.go | 4 | ||||
| -rw-r--r-- | src/crypto/cipher/ctr.go | 4 | ||||
| -rw-r--r-- | src/crypto/cipher/gcm.go | 6 | ||||
| -rw-r--r-- | src/crypto/cipher/ofb.go | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/crypto/cipher/cbc.go b/src/crypto/cipher/cbc.go index a719b61e24..1ce165e791 100644 --- a/src/crypto/cipher/cbc.go +++ b/src/crypto/cipher/cbc.go @@ -11,7 +11,7 @@ package cipher -import "crypto/internal/subtle" +import "crypto/internal/alias" type cbc struct { b Block @@ -72,7 +72,7 @@ func (x *cbcEncrypter) CryptBlocks(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } - if subtle.InexactOverlap(dst[:len(src)], src) { + if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") } @@ -143,7 +143,7 @@ func (x *cbcDecrypter) CryptBlocks(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } - if subtle.InexactOverlap(dst[:len(src)], src) { + if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") } if len(src) == 0 { diff --git a/src/crypto/cipher/cfb.go b/src/crypto/cipher/cfb.go index 80c9bc24ea..33615b01d5 100644 --- a/src/crypto/cipher/cfb.go +++ b/src/crypto/cipher/cfb.go @@ -6,7 +6,7 @@ package cipher -import "crypto/internal/subtle" +import "crypto/internal/alias" type cfb struct { b Block @@ -21,7 +21,7 @@ func (x *cfb) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } - if subtle.InexactOverlap(dst[:len(src)], src) { + if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") } for len(src) > 0 { diff --git a/src/crypto/cipher/ctr.go b/src/crypto/cipher/ctr.go index cba028d2a4..3b8e32a9a4 100644 --- a/src/crypto/cipher/ctr.go +++ b/src/crypto/cipher/ctr.go @@ -12,7 +12,7 @@ package cipher -import "crypto/internal/subtle" +import "crypto/internal/alias" type ctr struct { b Block @@ -76,7 +76,7 @@ func (x *ctr) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } - if subtle.InexactOverlap(dst[:len(src)], src) { + if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") } for len(src) > 0 { diff --git a/src/crypto/cipher/gcm.go b/src/crypto/cipher/gcm.go index 5b14c0a7e2..a23ebb1d90 100644 --- a/src/crypto/cipher/gcm.go +++ b/src/crypto/cipher/gcm.go @@ -5,7 +5,7 @@ package cipher import ( - subtleoverlap "crypto/internal/subtle" + "crypto/internal/alias" "crypto/subtle" "encoding/binary" "errors" @@ -174,7 +174,7 @@ func (g *gcm) Seal(dst, nonce, plaintext, data []byte) []byte { } ret, out := sliceForAppend(dst, len(plaintext)+g.tagSize) - if subtleoverlap.InexactOverlap(out, plaintext) { + if alias.InexactOverlap(out, plaintext) { panic("crypto/cipher: invalid buffer overlap") } @@ -225,7 +225,7 @@ func (g *gcm) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) { g.auth(expectedTag[:], ciphertext, data, &tagMask) ret, out := sliceForAppend(dst, len(ciphertext)) - if subtleoverlap.InexactOverlap(out, ciphertext) { + if alias.InexactOverlap(out, ciphertext) { panic("crypto/cipher: invalid buffer overlap") } diff --git a/src/crypto/cipher/ofb.go b/src/crypto/cipher/ofb.go index fc47724865..64e34a9676 100644 --- a/src/crypto/cipher/ofb.go +++ b/src/crypto/cipher/ofb.go @@ -6,7 +6,7 @@ package cipher -import "crypto/internal/subtle" +import "crypto/internal/alias" type ofb struct { b Block @@ -59,7 +59,7 @@ func (x *ofb) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } - if subtle.InexactOverlap(dst[:len(src)], src) { + if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") } for len(src) > 0 { |
