Show / Hide Table of Contents

AddExtension Method

AddExtension(string, byte[])

Add an entry to the extensions list.

C#
public void AddExtension(string extensionKey, byte[] encodedValue)

Parameters

Type Name Description
string extensionKey

The key of key/value to add.

byte[] encodedValue

The CBOR-encoded value of key/value to add.

Exceptions

Type Condition
ArgumentNullException

The extensionKey or encodedValue arg is null.

Remarks

If there is no list yet when this method is called, one will be created. That is, even if the Extensions is null, you can call the method to add an entry.

Each extension is a key/value pair. For each extension the key is a string (such as "credProtect" or "hmac-secret"). However, each value is different. There will be a definition of the value that accompanies each key. It will be possible to encode that definition using the rules of CBOR. The caller supplies the key and the encoded value. This method copies a reference to the byte array value.

In this article
Back to top Generated by DocFX