// Equals uses key digests to compare key equality.
769930
func (ky *Key) Equals(other *Key) bool {
	return bytes.Equal(ky.digest[:], other.digest[:])
}
88973
func (d *ResourceDevices) Equals(o *ResourceDevices) bool {
	if d == o {
		return true
	}
	if d == nil || o == nil {
		return false
	}
	if len(*d) != len(*o) {
		return false
	}
	m := make(map[string]*RequestedDevice, len(*d))
	for _, e := range *d {
		m[e.Name] = e
	}
	for _, oe := range *o {
		de, ok := m[oe.Name]
		if !ok || !de.Equals(oe) {
			return false
		}
	}
	return true
}
1015381
func (cm *ChanMode) Equals(other *ChanMode) bool {
	return reflect.DeepEqual(cm, other)
}
359152
func (v *Bonk) Equals(rhs *Bonk) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Message, rhs.Message) {
		return false
	}
	if !_I32_EqualsPtr(v.Type, rhs.Type) {
		return false
	}

	return true
}
760240
func (d *Context) Equals(index1 int, index2 int) bool {
	return int(C.duk_equals(d.duk_context, C.duk_idx_t(index1), C.duk_idx_t(index2))) == 1
}
724472
func (s *xorKeySpace) Equal(k1, k2 Key) bool {
	return bytes.Equal(k1.Bytes, k2.Bytes)
}
887239
func KeysEqual(ak, bk PublicKey) bool {

	//avoid panic if one of the keys is nil, return false instead
	if ak == nil || bk == nil {
		return false
	}

	a := ak.Marshal()
	b := bk.Marshal()
	return (len(a) == len(b) && subtle.ConstantTimeCompare(a, b) == 1)
}
1074227
func (n ACIdentifier) Equals(o ACIdentifier) bool {
	return strings.ToLower(string(n)) == strings.ToLower(string(o))
}
1370778
func (ch *Channel) Equals(other *Channel) bool {
	return reflect.DeepEqual(ch, other)
}
435426
func (v *Xception2) Equals(rhs *Xception2) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_I32_EqualsPtr(v.ErrorCode, rhs.ErrorCode) {
		return false
	}
	if !((v.StructThing == nil && rhs.StructThing == nil) || (v.StructThing != nil && rhs.StructThing != nil && v.StructThing.Equals(rhs.StructThing))) {
		return false
	}

	return true
}
173941
func (k1 Key) Equal(k2 Key) bool {
	if k1.Space != k2.Space {
		panic("k1 and k2 not in same key space.")
	}
	return k1.Space.Equal(k1, k2)
}
561872
func (k Key) Equal(k2 Key) bool {
	return k.string == k2.string
}
352211
func Equals(a, b error) bool {
	if a == nil && b == nil {
		// Both are nil.
		return true
	}

	if a == nil || b == nil {
		// One of the two is nil, since we know both are not nil.
		return false
	}

	return a.Error() == b.Error() && Code(a) == Code(b)
}
76727
func (p Policy) Equals(another Policy) bool {
	if p.Etag != another.Etag {
		return false
	}

	if !p.Bindings.Equals(another.Bindings) {
		return false
	}

	if len(p.UnrecognizedFields) != len(another.UnrecognizedFields) {
		return false
	}
	for k, left := range p.UnrecognizedFields {
		right, hasIt := another.UnrecognizedFields[k]
		if !hasIt || !isEqualRawMsg(left, right) {
			return false
		}
	}

	return true
}
1317069
func (state State) Equals(state2 State) bool {
	sbz, s2bz := state.Bytes(), state2.Bytes()
	return bytes.Equal(sbz, s2bz)
}
888327
func (c SeqEnd) Equals(other core.DxfElement) bool {
	if otherSeqEnd, ok := other.(*SeqEnd); ok {
		return c.BaseEntity.Equals(otherSeqEnd.BaseEntity)
	}
	return false
}
1123141
func (s String) Equals(other DxfElement) bool {
	if sStr, ok := other.(*String); ok {
		return s.value == sStr.value
	}
	return false
}