func bytes.Equal
97 uses
bytes (current package)
bytes.go#L20: func Equal(a, b []byte) bool {
bytes.go#L119: if Equal(s, sep) {
bytes.go#L595: return len(s) >= len(prefix) && Equal(s[:len(prefix)], prefix)
bytes.go#L600: return len(s) >= len(suffix) && Equal(s[len(s)-len(suffix):], suffix)
bytes.go#L1313: if Equal(sep, s) {
bytes.go#L1339: if s[i+1] == c1 && Equal(s[i:i+n], sep) {
bytes.go#L1368: if s[i+1] == c1 && Equal(s[i:i+n], sep) {
crypto/internal/fips140/aes
cast.go#L38: if !bytes.Equal(buf, ciphertext) {
cast.go#L42: if !bytes.Equal(buf, plaintext) {
crypto/internal/fips140/drbg
cast.go#L53: if !bytes.Equal(got, want) {
crypto/internal/fips140/ecdh
cast.go#L47: if !bytes.Equal(got, want) {
ecdh.go#L205: if !bytes.Equal(p1.Bytes(), publicKey) {
crypto/internal/fips140/ecdsa
cast.go#L99: if !bytes.Equal(got.R, want.R) || !bytes.Equal(got.S, want.S) {
cast.go#L131: if !bytes.Equal(got.R, want.R) || !bytes.Equal(got.S, want.S) {
crypto/internal/fips140/ed25519
cast.go#L71: if !bytes.Equal(sig, want) {
ed25519.go#L337: if !bytes.Equal(sig[:32], R.Bytes()) {
crypto/internal/fips140/hkdf
cast.go#L28: if !bytes.Equal(got, want) {
crypto/internal/fips140/hmac
cast.go#L29: if got := h.Sum(nil); !bytes.Equal(got, want) {
crypto/internal/fips140/mlkem
cast.go#L48: if !bytes.Equal(Ke, K) || !bytes.Equal(Kd, K) {
mlkem1024.go#L191: if !bytes.Equal(dk.h[:], b[:32]) {
mlkem768.go#L250: if !bytes.Equal(dk.h[:], b[:32]) {
crypto/internal/fips140/rsa
cast.go#L229: if !bytes.Equal(sig, want) {
pkcs1v15.go#L124: if !bytes.Equal(em, expected) {
pkcs1v22.go#L245: if !bytes.Equal(h0, h) { // TODO: constant time?
crypto/internal/fips140/sha256
cast.go#L27: if got := h.Sum(nil); !bytes.Equal(got, want) {
crypto/internal/fips140/sha3
cast.go#L27: if got := h.Sum(nil); !bytes.Equal(got, want) {
crypto/internal/fips140/sha512
cast.go#L31: if got := h.Sum(nil); !bytes.Equal(got, want) {
crypto/internal/fips140/tls12
cast.go#L33: if got := MasterSecret(sha256.New, input, transcript); !bytes.Equal(got, want) {
crypto/internal/fips140/tls13
cast.go#L32: if got := ms.ResumptionMasterSecret(transcript); !bytes.Equal(got, want) {
crypto/tls
common.go#L1467: if bytes.Equal(x509Cert.RawIssuer, ca) {
ech.go#L380: if !bytes.Equal(inner.encryptedClientHello, []byte{uint8(innerECHExt)}) {
handshake_client.go#L398: echInner := bytes.Equal(hello.encryptedClientHello, []byte{1})
handshake_client.go#L708: if !bytes.Equal(c.peerCertificates[0].Raw, certMsg.certificates[0]) {
handshake_client.go#L870: bytes.Equal(hs.serverHello.sessionId, hs.hello.sessionId)
handshake_client.go#L897: if !bytes.Equal(hs.serverHello.secureRenegotiation, expectedSecureRenegotiation[:]) {
handshake_client_tls13.go#L79: if bytes.Equal(hs.serverHello.random, helloRetryRequestRandom) {
handshake_client_tls13.go#L193: if !bytes.Equal(hs.hello.sessionId, hs.serverHello.sessionId) {
handshake_client_tls13.go#L417: if bytes.Equal(hs.serverHello.random, helloRetryRequestRandom) {
handshake_server_tls13.go#L712: !bytes.Equal(ch.random, ch1.random) ||
handshake_server_tls13.go#L713: !bytes.Equal(ch.sessionId, ch1.sessionId) ||
handshake_server_tls13.go#L714: !bytes.Equal(ch.compressionMethods, ch1.compressionMethods) ||
handshake_server_tls13.go#L717: !bytes.Equal(ch.supportedPoints, ch1.supportedPoints) ||
handshake_server_tls13.go#L719: !bytes.Equal(ch.sessionTicket, ch1.sessionTicket) ||
handshake_server_tls13.go#L721: !bytes.Equal(ch.secureRenegotiation, ch1.secureRenegotiation) ||
handshake_server_tls13.go#L723: !bytes.Equal(ch.cookie, ch1.cookie) ||
handshake_server_tls13.go#L724: !bytes.Equal(ch.pskModes, ch1.pskModes)
tls.go#L342: if !bytes.Equal(priv.Public().(ed25519.PublicKey), pub) {
crypto/x509
cert_pool.go#L149: kidMatch := bytes.Equal(candidate.SubjectKeyId, cert.AuthorityKeyId)
oid.go#L212: return bytes.Equal(oid.der, other.der)
parser.go#L226: if !bytes.Equal(params.FullBytes, asn1.NullBytes) {
parser.go#L946: if !bytes.Equal(outerSigAISeq, sigAISeq) {
parser.go#L1153: if !bytes.Equal(outerSigAISeq, sigAISeq) {
verify.go#L604: if !bytes.Equal(child.RawIssuer, c.RawSubject) {
verify.go#L927: if !bytes.Equal(candidate.RawSubject, cert.RawSubject) {
verify.go#L945: if bytes.Equal(candidateSAN.Value, certSAN.Value) {
verify.go#L1444: isSelfSigned := bytes.Equal(cert.RawIssuer, cert.RawSubject)
x509.go#L452: if (len(params.Hash.Parameters.FullBytes) != 0 && !bytes.Equal(params.Hash.Parameters.FullBytes, asn1.NullBytes)) ||
x509.go#L455: (len(mgf1HashFunc.Parameters.FullBytes) != 0 && !bytes.Equal(mgf1HashFunc.Parameters.FullBytes, asn1.NullBytes)) ||
x509.go#L900: return bytes.Equal(c.Raw, other.Raw)
x509.go#L1734: if !bytes.Equal(asn1Issuer, asn1Subject) && len(parent.SubjectKeyId) > 0 {
x509.go#L1758: extensions, err := buildCertExtensions(template, bytes.Equal(asn1Subject, emptyASN1Subject), authorityKeyId, subjectKeyId)
github.com/google/go-cmp/cmp
report_text.go#L351: return bytes.Equal([]byte(s1), []byte(s2))
go.uber.org/zap/zapcore
field.go#L200: return bytes.Equal(f.Interface.([]byte), other.Interface.([]byte))
go/build
build.go#L1676: if !inSlashStar && bytes.Equal(line, binaryOnlyComment) {
read.go#L42: if leadingBytes, err := b.Peek(3); err == nil && bytes.Equal(leadingBytes, bom) {
golang.org/x/net/http2
server.go#L1138: } else if !bytes.Equal(buf, clientPreface) {
golang.org/x/text/transform
transform.go#L607: if !bytes.Equal(dst[:nDst], src[:nSrc]) {
google.golang.org/grpc/internal/transport
http2_server.go#L321: if !bytes.Equal(preface, clientPreface) {
google.golang.org/protobuf/internal/encoding/json
decode_token.go#L189: bytes.Equal(x.raw, y.raw) &&
google.golang.org/protobuf/internal/encoding/text
decode_token.go#L371: bytes.Equal(x.raw, y.raw) &&
google.golang.org/protobuf/internal/filedesc
desc.go#L741: if len(dv.bytes) > 0 && !bytes.Equal(dv.bytes, dv.val.Bytes()) {
google.golang.org/protobuf/internal/impl
equal.go#L197: if bytes.Equal([]byte(x), []byte(y)) {
equal.go#L218: if v2, ok := my[k]; !ok || !bytes.Equal([]byte(v1), []byte(v2)) {
google.golang.org/protobuf/reflect/protoreflect
value_equal.go#L61: return eqType && bytes.Equal(x.Bytes(), y.Bytes())
value_equal.go#L151: if bytes.Equal([]byte(x), []byte(y)) {
html/template
transition.go#L57: } else if i+4 <= len(s) && bytes.Equal(commentStart, s[i:i+4]) {
transition.go#L311: if i+3 < len(s) && bytes.Equal(commentStart, s[i:i+4]) {
transition.go#L315: if i+2 < len(s) && bytes.Equal(commentEnd, s[i:i+3]) {
transition.go#L417: if i > 0 && i+7 <= len(s) && bytes.Equal(bytes.ToLower(s[i-1:i+7]), []byte("</script")) {
mime/multipart
multipart.go#L435: if bytes.Equal(line, r.nl) {
multipart.go#L453: return len(rest) == 0 || bytes.Equal(rest, r.nl)
multipart.go#L476: return bytes.Equal(rest, r.nl)
net/http
h2_bundle.go#L5189: } else if !bytes.Equal(buf, http2clientPreface) {
server.go#L2195: return err == nil && bytes.Equal(got, preface)
sniff.go#L275: if !bytes.Equal(data[4:8], mp4ftype) {
sniff.go#L283: if bytes.Equal(data[st:st+3], mp4) {
transfer.go#L914: if bytes.Equal(buf, singleCRLF) {
testing/iotest
reader.go#L148: if !bytes.Equal(data, content) {
reader.go#L187: if !bytes.Equal(data, content[middle:]) {
reader.go#L204: if !bytes.Equal(data, content[middle:]) {
reader.go#L216: if !bytes.Equal(data, content[middle/2:]) {
reader.go#L230: if !bytes.Equal(data, content) {
reader.go#L246: if !bytes.Equal(data, content) {
vendor/golang.org/x/text/transform
transform.go#L607: if !bytes.Equal(dst[:nDst], src[:nSrc]) {