Share via


AsnDecoder.ReadInteger メソッド

定義

指定したエンコード規則に基づいて、指定したタグを持つ source から整数値を読み取ります。

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

パラメーター

source
ReadOnlySpan<Byte>

エンコードされたデータを含むバッファー。

ruleSet
AsnEncodingRules

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

bytesConsumed
Int32

このメソッドが返されると、エンコードされた値の合計バイト数が返されます。 このパラメーターは初期化前として処理されます。

expectedTag
Nullable<Asn1Tag>

読み取る前にチェックするタグ、または既定のタグ (Universal 2) の場合は null

戻り値

デコードされた数値。

例外

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

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

または

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

または

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

expectedTagTagClassUniversalですがexpectedTagTagValue、 メソッドでは 正しくありません。

適用対象