mirror of
https://github.com/golang/go.git
synced 2026-04-01 17:07:17 +09:00
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:
@@ -8,7 +8,7 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
"errors"
|
||||
)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -6,8 +6,8 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/boring"
|
||||
"crypto/internal/fips/alias"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/boring"
|
||||
"crypto/internal/fips/alias"
|
||||
"internal/cpu"
|
||||
"internal/goarch"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"internal/cpu"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"internal/byteorder"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
"errors"
|
||||
"internal/byteorder"
|
||||
|
||||
@@ -8,7 +8,7 @@ package aes
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
"errors"
|
||||
"internal/byteorder"
|
||||
|
||||
@@ -13,7 +13,7 @@ package cipher
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package cipher
|
||||
|
||||
import (
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ package cipher
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
package cipher
|
||||
|
||||
import (
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
"errors"
|
||||
"internal/byteorder"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package cipher
|
||||
|
||||
import (
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"crypto/subtle"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ package des
|
||||
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"internal/byteorder"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
package rc4
|
||||
|
||||
import (
|
||||
"crypto/internal/alias"
|
||||
"crypto/internal/fips/alias"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user