AddExtension Method
AddExtension(String, Byte[])
Add an entry to the extensions list.
C#
public void AddExtension(string extensionKey, byte[] encodedValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | extensionKey | The key of key/value to add. |
System.Byte[] | encodedValue | The CBOR-encoded value of key/value to add. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
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.