共用方式為


Base64Url.IsValid 方法

定義

多載

名稱 Description
IsValid(ReadOnlySpan<Byte>)

驗證指定的 UTF-8 文字範圍是由有效的 base-64 編碼數據所組成。

IsValid(ReadOnlySpan<Char>)

驗證指定的文字範圍是由有效的base-64編碼數據所組成。

IsValid(ReadOnlySpan<Byte>, Int32)

驗證指定的 UTF-8 文字範圍是由有效的 base-64 編碼數據所組成。

IsValid(ReadOnlySpan<Char>, Int32)

驗證指定的文字範圍是由有效的base-64編碼數據所組成。

IsValid(ReadOnlySpan<Byte>)

來源:
Base64UrlValidator.cs

驗證指定的 UTF-8 文字範圍是由有效的 base-64 編碼數據所組成。

public:
 static bool IsValid(ReadOnlySpan<System::Byte> utf8Base64UrlText);
public static bool IsValid(ReadOnlySpan<byte> utf8Base64UrlText);
static member IsValid : ReadOnlySpan<byte> -> bool
Public Shared Function IsValid (utf8Base64UrlText As ReadOnlySpan(Of Byte)) As Boolean

參數

utf8Base64UrlText
ReadOnlySpan<Byte>

要驗證的UTF-8文字範圍。

傳回

true 如果 utf8Base64UrlText 包含base-64編碼數據的有效可譯譯序列;否則,false

備註

其中空格元定義為字元 '、'\t'、'\r'或 '\n' (位元組)。

適用於

IsValid(ReadOnlySpan<Char>)

來源:
Base64UrlValidator.cs

驗證指定的文字範圍是由有效的base-64編碼數據所組成。

public:
 static bool IsValid(ReadOnlySpan<char> base64UrlText);
public static bool IsValid(ReadOnlySpan<char> base64UrlText);
static member IsValid : ReadOnlySpan<char> -> bool
Public Shared Function IsValid (base64UrlText As ReadOnlySpan(Of Char)) As Boolean

參數

base64UrlText
ReadOnlySpan<Char>

要驗證的文字範圍。

傳回

true 如果 base64UrlText 包含base-64編碼數據的有效可譯譯序列;否則,false

備註

如果方法傳回 true,則傳遞至 DecodeFromChars(ReadOnlySpan<Char>) 和的相同文字

TryDecodeFromChars(ReadOnlySpan<Char>, Span<Byte>, Int32) 成功譯碼 (在此情況下

TryDecodeFromChars(ReadOnlySpan<Char>, Span<Byte>, Int32) 假設有足夠的輸出空間)。

輸入中的任何位置都允許任意數量的空格符,其中空格元定義為字元 '、'\t'、'\r'或 '\n'。

適用於

IsValid(ReadOnlySpan<Byte>, Int32)

來源:
Base64UrlValidator.cs

驗證指定的 UTF-8 文字範圍是由有效的 base-64 編碼數據所組成。

public:
 static bool IsValid(ReadOnlySpan<System::Byte> utf8Base64UrlText, [Runtime::InteropServices::Out] int % decodedLength);
public static bool IsValid(ReadOnlySpan<byte> utf8Base64UrlText, out int decodedLength);
static member IsValid : ReadOnlySpan<byte> * int -> bool
Public Shared Function IsValid (utf8Base64UrlText As ReadOnlySpan(Of Byte), ByRef decodedLength As Integer) As Boolean

參數

utf8Base64UrlText
ReadOnlySpan<Byte>

要驗證的UTF-8文字範圍。

decodedLength
Int32

如果方法傳回 true,則譯碼的位元元組數目將來自譯碼輸入UTF-8文字。

傳回

true 如果 utf8Base64UrlText 包含base-64編碼數據的有效可譯譯序列;否則,false

備註

其中空格元定義為字元 '、'\t'、'\r'或 '\n' (位元組)。

適用於

IsValid(ReadOnlySpan<Char>, Int32)

來源:
Base64UrlValidator.cs

驗證指定的文字範圍是由有效的base-64編碼數據所組成。

public:
 static bool IsValid(ReadOnlySpan<char> base64UrlText, [Runtime::InteropServices::Out] int % decodedLength);
public static bool IsValid(ReadOnlySpan<char> base64UrlText, out int decodedLength);
static member IsValid : ReadOnlySpan<char> * int -> bool
Public Shared Function IsValid (base64UrlText As ReadOnlySpan(Of Char), ByRef decodedLength As Integer) As Boolean

參數

base64UrlText
ReadOnlySpan<Char>

要驗證的文字範圍。

decodedLength
Int32

如果方法傳回 true,則譯碼的位元元組數目將會由譯碼輸入文字所產生。

傳回

true 如果 base64UrlText 包含base-64編碼數據的有效可譯譯序列;否則,false

備註

如果方法傳回 true,則傳遞至 DecodeFromChars(ReadOnlySpan<Char>) 和的相同文字

TryDecodeFromChars(ReadOnlySpan<Char>, Span<Byte>, Int32) 成功譯碼 (在此情況下

TryDecodeFromChars(ReadOnlySpan<Char>, Span<Byte>, Int32) 假設有足夠的輸出空間)。

輸入中的任何位置都允許任意數量的空格符,其中空格元定義為字元 '、'\t'、'\r'或 '\n'。

適用於