次の方法で共有


AsnDecoder.ReadUtcTime メソッド

定義

指定したエンコード規則の下で、指定したタグを持つ source から UtcTime 値を読み取ります。

public static DateTimeOffset ReadUtcTime(ReadOnlySpan<byte> source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, int twoDigitYearMax = 2049, System.Formats.Asn1.Asn1Tag? expectedTag = default);
static member ReadUtcTime : ReadOnlySpan<byte> * System.Formats.Asn1.AsnEncodingRules * int * int * Nullable<System.Formats.Asn1.Asn1Tag> -> DateTimeOffset
Public Shared Function ReadUtcTime (source As ReadOnlySpan(Of Byte), ruleSet As AsnEncodingRules, ByRef bytesConsumed As Integer, Optional twoDigitYearMax As Integer = 2049, Optional expectedTag As Nullable(Of Asn1Tag) = Nothing) As DateTimeOffset

パラメーター

source
ReadOnlySpan<Byte>

エンコードされたデータを格納しているバッファー。

ruleSet
AsnEncodingRules

データを解釈するときに使用するエンコード制約。

bytesConsumed
Int32

このメソッドが返されるときに、エンコードされた値の合計バイト数。 このパラメーターは、初期化されていないものとして扱われます。

twoDigitYearMax
Int32

この値で表す最大の年。 既定値の 2049 は、X.509 証明書の 1950 から 2049 の範囲を表します。

expectedTag
Nullable<Asn1Tag>

読み取る前に確認するタグ、または既定のタグ (ユニバーサル 23) の null

返品

デコードされた値。

例外

ruleSet が定義されていません。

 -or-

 <code data-dev-comment-type="paramref">twoDigitYearMax</code> is not in the range [99, 9999].

次の値に正しいタグがありません。

-又は-

現在のエンコード規則では、長さのエンコードは無効です。

-又は-

コンテンツは、現在のエンコード規則では無効です。

expectedTag.TagClassUniversalですが、 expectedTag.TagValue はメソッドに適していません。

適用対象

こちらもご覧ください