Show / Hide Table of Contents

WriteMsrootsStream Method

WriteMsrootsStream(Stream)

Write contents to the MSROOTS data objects. This will replace any data already stored in the MSROOTS data objects.

C#
public void WriteMsrootsStream(Stream contents)

Parameters

Type Name Description
Stream contents

The data to store, represented as a Stream (the CanRead property is true and the data read will be bytes).

Exceptions

Type Condition
ArgumentNullException

The contents argument is null.

ArgumentException

The stream is not readable.

ArgumentOutOfRangeException

The input data was too long.

InvalidOperationException

There is no KeyCollector loaded, the key provided was not a valid Triple-DES key, or the YubiKey had some other error, such as unreliable connection.

MalformedYubiKeyResponseException

The YubiKey returned malformed data and authentication, either single or double, could not be performed.

OperationCanceledException

The user canceled management key collection.

SecurityException

Mutual authentication was performed and the YubiKey was not authenticated.

Remarks

This is the same as WriteMsroots(ReadOnlySpan<byte>) except the contents are provided as a Stream.

In this article
Back to top Generated by DocFX