blob: 44011273655def803a0a4c43ada69dbae3b68733 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
using System;
using Org.BouncyCastle.Utilities;
using Org.BouncyCastle.X509.Store;
namespace Org.BouncyCastle.Cms
{
// TODO[api] sealed
public class OriginatorID
: X509CertStoreSelector, IEquatable<OriginatorID>
{
public virtual bool Equals(OriginatorID other)
{
return other == null ? false
: other == this ? true
: MatchesSubjectKeyIdentifier(other)
&& MatchesSerialNumber(other)
&& MatchesIssuer(other);
}
public override bool Equals(object obj) => Equals(obj as OriginatorID);
public override int GetHashCode()
{
return GetHashCodeOfSubjectKeyIdentifier()
^ Objects.GetHashCode(SerialNumber)
^ Objects.GetHashCode(Issuer);
}
}
}
|