Class Envelope
An authenticated message of arbitrary type.
public sealed class Envelope : IMessage<Envelope>, IEquatable<Envelope>, IDeepCloneable<Envelope>, IBufferMessage, IMessage
- Inheritance
-
Envelope
- Inherited Members
Constructors
Envelope()
public Envelope()
Envelope(Envelope)
public Envelope(Envelope other)
Parameters
otherEnvelope
Fields
PayloadFieldNumber
Field number for the "payload" field.
public const int PayloadFieldNumber = 1
Field Value
PayloadTypeFieldNumber
Field number for the "payloadType" field.
public const int PayloadTypeFieldNumber = 2
Field Value
SignaturesFieldNumber
Field number for the "signatures" field.
public const int SignaturesFieldNumber = 3
Field Value
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Parser
public static MessageParser<Envelope> Parser { get; }
Property Value
- MessageParser<Envelope>
Payload
Message to be signed. (In JSON, this is encoded as base64.) REQUIRED.
public ByteString Payload { get; set; }
Property Value
- ByteString
PayloadType
String unambiguously identifying how to interpret payload. REQUIRED.
public string PayloadType { get; set; }
Property Value
Signatures
Signature over: PAE(type, payload) Where PAE is defined as: PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
-
= concatenation
SP = ASCII space [0x20] "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31] LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros REQUIRED (length >= 1).
public RepeatedField<Signature> Signatures { get; }
Property Value
- RepeatedField<Signature>
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 Envelope Clone()
Returns
- Envelope
A deep clone of this object.
Equals(Envelope)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Envelope other)
Parameters
otherEnvelopeAn 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(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.
MergeFrom(Envelope)
Merges the given message into this one.
public void MergeFrom(Envelope other)
Parameters
otherEnvelope
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.