obfuz/Plugins/dnlib/DotNet/PublicKeyToken.cs

42 lines
908 B
C#
Raw Normal View History

2025-04-08 20:31:44 +08:00
// dnlib: See LICENSE.txt for more info
namespace dnlib.DotNet {
/// <summary>
/// Represents a public key token
/// </summary>
public sealed class PublicKeyToken : PublicKeyBase {
/// <summary>
/// Gets the <see cref="PublicKeyToken"/>
/// </summary>
public override PublicKeyToken Token => this;
/// <summary>
/// Constructor
/// </summary>
public PublicKeyToken() : base((byte[])null) { }
/// <inheritdoc/>
public PublicKeyToken(byte[] data)
: base(data) {
}
/// <inheritdoc/>
public PublicKeyToken(string hexString)
: base(hexString) {
}
/// <inheritdoc/>
public override bool Equals(object obj) {
if ((object)this == obj)
return true;
var other = obj as PublicKeyToken;
if (other is null)
return false;
return Utils.Equals(Data, other.Data);
}
/// <inheritdoc/>
public override int GetHashCode() => Utils.GetHashCode(Data);
}
}