Class InclusionProof
InclusionProof is the proof returned from the transparency log. Can be used for offline or online verification against the log.
public sealed class InclusionProof : IMessage<InclusionProof>, IEquatable<InclusionProof>, IDeepCloneable<InclusionProof>, IBufferMessage, IMessage
- Inheritance
-
InclusionProof
- Implements
-
IMessage<InclusionProof>IDeepCloneable<InclusionProof>IBufferMessageIMessage
- Inherited Members
Constructors
InclusionProof()
public InclusionProof()
InclusionProof(InclusionProof)
public InclusionProof(InclusionProof other)
Parameters
otherInclusionProof
Fields
CheckpointFieldNumber
Field number for the "checkpoint" field.
public const int CheckpointFieldNumber = 5
Field Value
HashesFieldNumber
Field number for the "hashes" field.
public const int HashesFieldNumber = 4
Field Value
LogIndexFieldNumber
Field number for the "log_index" field.
public const int LogIndexFieldNumber = 1
Field Value
RootHashFieldNumber
Field number for the "root_hash" field.
public const int RootHashFieldNumber = 2
Field Value
TreeSizeFieldNumber
Field number for the "tree_size" field.
public const int TreeSizeFieldNumber = 3
Field Value
Properties
Checkpoint
Signature of the tree head, as of the time of this proof was generated. See above info on 'Checkpoint' for more details.
public Checkpoint Checkpoint { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Hashes
A list of hashes required to compute the inclusion proof, sorted in order from leaf to root. Note that leaf and root hashes are not included. The root hash is available separately in this message, and the leaf hash should be calculated by the client.
public RepeatedField<ByteString> Hashes { get; }
Property Value
- RepeatedField<ByteString>
LogIndex
The index of the entry in the tree it was written to.
public long LogIndex { get; set; }
Property Value
Parser
public static MessageParser<InclusionProof> Parser { get; }
Property Value
- MessageParser<InclusionProof>
RootHash
The hash digest stored at the root of the merkle tree at the time the proof was generated.
public ByteString RootHash { get; set; }
Property Value
- ByteString
TreeSize
The size of the merkle tree at the time the proof was generated.
public long TreeSize { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public InclusionProof Clone()
Returns
- InclusionProof
A deep clone of this object.
Equals(InclusionProof)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(InclusionProof other)
Parameters
otherInclusionProofAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(InclusionProof)
Merges the given message into this one.
public void MergeFrom(InclusionProof other)
Parameters
otherInclusionProof
Remarks
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.