Class Signature
Inheritance
System.Object
Signature
Implements
Google.Protobuf.IMessage<Signature>
Google.Protobuf.IMessage
System.IEquatable<Signature>
Google.Protobuf.IDeepCloneable<Signature>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Catalyst.Protocol.Cryptography
Assembly: Catalyst.Protocol.dll
Syntax
public sealed class Signature : IMessage<Signature>, IMessage, IEquatable<Signature>, IDeepCloneable<Signature>
Constructors
| Improve this Doc View SourceSignature()
Declaration
public Signature()
Signature(Signature)
Declaration
public Signature(Signature other)
Parameters
| Type | Name | Description |
|---|---|---|
| Signature | other |
Fields
| Improve this Doc View SourceRawBytesFieldNumber
Field number for the "raw_bytes" field.
Declaration
public const int RawBytesFieldNumber = 2
Field Value
| Type | Description |
|---|---|
| System.Int32 |
SigningContextFieldNumber
Field number for the "signing_context" field.
Declaration
public const int SigningContextFieldNumber = 1
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Properties
| Improve this Doc View SourceDescriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
| Type | Description |
|---|---|
| Google.Protobuf.Reflection.MessageDescriptor |
Parser
Declaration
public static MessageParser<Signature> Parser { get; }
Property Value
| Type | Description |
|---|---|
| Google.Protobuf.MessageParser<Signature> |
RawBytes
Declaration
public ByteString RawBytes { get; set; }
Property Value
| Type | Description |
|---|---|
| Google.Protobuf.ByteString |
SigningContext
Declaration
public SigningContext SigningContext { get; set; }
Property Value
| Type | Description |
|---|---|
| SigningContext |
Methods
| Improve this Doc View SourceCalculateSize()
Declaration
public int CalculateSize()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Clone()
Declaration
public Signature Clone()
Returns
| Type | Description |
|---|---|
| Signature |
Equals(Signature)
Declaration
public bool Equals(Signature other)
Parameters
| Type | Name | Description |
|---|---|---|
| Signature | other |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | other |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
IsValid(SignatureType)
Checks if the signature seems valid.
Declaration
public bool IsValid(SignatureType expectedSignatureType = SignatureType.Unknown)
Parameters
| Type | Name | Description |
|---|---|---|
| SignatureType | expectedSignatureType | If provided, the signature type will be checked against the expected type. Otherwise, we simply check the type is not unknown. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
The validation, using a public key, of the actual signature against a content it signs, is outside the scope of this method. In the Core implementation of the protocol, this is performed in the Cryptography module.
MergeFrom(Signature)
Declaration
public void MergeFrom(Signature other)
Parameters
| Type | Name | Description |
|---|---|---|
| Signature | other |
MergeFrom(CodedInputStream)
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
| Type | Name | Description |
|---|---|---|
| Google.Protobuf.CodedInputStream | input |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
| Type | Name | Description |
|---|---|---|
| Google.Protobuf.CodedOutputStream | output |
Explicit Interface Implementations
| Improve this Doc View SourceIMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
| Type | Description |
|---|---|
| Google.Protobuf.Reflection.MessageDescriptor |
Implements
Google.Protobuf.IMessage<T>
Google.Protobuf.IMessage
System.IEquatable<T>
Google.Protobuf.IDeepCloneable<T>