mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-25 19:56:18 +08:00
10 lines
159 B
Go
10 lines
159 B
Go
package subtle
|
|
|
|
func ConstantTimeAllZero(bytes []byte) int {
|
|
var b uint8
|
|
for _, v := range bytes {
|
|
b |= v
|
|
}
|
|
return int((uint32(b) - 1) >> 31)
|
|
}
|