crypto/internal/alias: move to crypto/internal/fips/alias

For #69536

Change-Id: Id0bb46fbb39c205ebc903e72e706bbbaaeec6dbd
Reviewed-on: https://go-review.googlesource.com/c/go/+/622275
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Roland Shoemaker <roland@golang.org>
This commit is contained in:
Filippo Valsorda
2024-10-24 16:10:53 +02:00
parent 44b2ba721b
commit 15b7046309
20 changed files with 20 additions and 19 deletions

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
"errors"
)

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
)
// Assert that aesCipherAsm implements the cbcEncAble and cbcDecAble interfaces.

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
)
// Assert that aesCipherAsm implements the cbcEncAble and cbcDecAble interfaces.

View File

@@ -6,8 +6,8 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/boring"
"crypto/internal/fips/alias"
"strconv"
)

View File

@@ -8,8 +8,8 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/boring"
"crypto/internal/fips/alias"
"internal/cpu"
"internal/goarch"
)

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"internal/cpu"
)

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"internal/byteorder"
)

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
"errors"
"internal/byteorder"

View File

@@ -8,7 +8,7 @@ package aes
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
"errors"
"internal/byteorder"

View File

@@ -13,7 +13,7 @@ package cipher
import (
"bytes"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
)

View File

@@ -7,7 +7,7 @@
package cipher
import (
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
)

View File

@@ -14,7 +14,7 @@ package cipher
import (
"bytes"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
)

View File

@@ -5,7 +5,7 @@
package cipher
import (
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
"errors"
"internal/byteorder"

View File

@@ -7,7 +7,7 @@
package cipher
import (
"crypto/internal/alias"
"crypto/internal/fips/alias"
"crypto/subtle"
)

View File

@@ -6,7 +6,7 @@ package des
import (
"crypto/cipher"
"crypto/internal/alias"
"crypto/internal/fips/alias"
"internal/byteorder"
"strconv"
)

View File

@@ -10,7 +10,7 @@
package rc4
import (
"crypto/internal/alias"
"crypto/internal/fips/alias"
"strconv"
)

View File

@@ -452,6 +452,7 @@ var depsRules = `
# backwards compatibility with older versions of the module.
STR, crypto/internal/impl
< crypto/internal/fips
< crypto/internal/fips/alias
< crypto/internal/fips/subtle
< crypto/internal/fips/sha256
< crypto/internal/fips/sha512
@@ -474,7 +475,6 @@ var depsRules = `
hash, embed
< crypto
< crypto/subtle
< crypto/internal/alias
< crypto/cipher;
crypto/cipher,
@@ -482,7 +482,8 @@ var depsRules = `
< crypto/internal/boring
< crypto/boring;
crypto/internal/alias, math/rand/v2
crypto/internal/fips/alias, math/rand/v2,
crypto/subtle, embed
< crypto/internal/randutil
< crypto/internal/nistec/fiat
< crypto/internal/nistec

View File

@@ -449,7 +449,7 @@ func overlaps[E any](a, b []E) bool {
return false
}
// TODO: use a runtime/unsafe facility once one becomes available. See issue 12445.
// Also see crypto/internal/alias/alias.go:AnyOverlap
// Also see crypto/internal/fips/alias/alias.go:AnyOverlap
return uintptr(unsafe.Pointer(&a[0])) <= uintptr(unsafe.Pointer(&b[len(b)-1]))+(elemSize-1) &&
uintptr(unsafe.Pointer(&b[0])) <= uintptr(unsafe.Pointer(&a[len(a)-1]))+(elemSize-1)
}