Show / Hide Table of Contents

Encode Method

Encode()

Build the Serialized Large Blob Array. This builds the CBOR encoding of the large blob array, digests that array, and appends the digest.

C#
public byte[] Encode()

Returns

byte[]

A new byte array containing the Serialized Large Blob Array.

Remarks

There is the Large Blob Array, which is the CBOR encoded array of entries. Then the Serialized Large Blob Array is the concatenation of the Large Blob Array with the digest of the Large Blob Array. This builds the Serialized Large Blob Array.

This is simply the concatenation of the EncodedArray and Digest properties. However, those can be null until a call is made to encode. For example, suppose you get a Large Blob Array from a YubiKey, and the EncodedArray and Digest properties are set. But now you AddEntry(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>), which will mean the array and digest must change. This class will not update the array and digest until you call this method to encode (in case you want to add another entry).

Once you call this method, the array and digest will be computed and those properties will be set.

In this article
Back to top Generated by DocFX