github.com/emmansun/gmsm@v0.29.1/internal/subtle/constant_time.go (about)

     1  package subtle
     2  
     3  func ConstantTimeAllZero(bytes []byte) int {
     4  	var b uint8
     5  	for _, v := range bytes {
     6  		b |= v
     7  	}
     8  	return int((uint32(b) - 1) >> 31)
     9  }