HttpServerUtility.UrlTokenEncode(Byte[]) 方法

定義

將位元組陣列編碼成其對等的字串表示,該字串使用 Base 64 數字且可在 URL 上傳輸。

public:
 static System::String ^ UrlTokenEncode(cli::array <System::Byte> ^ input);
public static string UrlTokenEncode (byte[] input);
static member UrlTokenEncode : byte[] -> string
Public Shared Function UrlTokenEncode (input As Byte()) As String

參數

input
Byte[]

要編碼的位元組陣列。

傳回

String

如果位元組陣列 length 大於一,則為包含已編碼語彙基元的字串;否則為空字串 ("")。

例外狀況

input 參數的值為 null

備註

方法 UrlTokenEncode 會將位元組陣列轉換成以基底 64 位數編碼的對等字串表示。 產生的字串權杖可以在 URL 上傳輸。

如果 input 參數的長度小於 1,則會 UrlTokenEncode 傳回空字串。

適用於

另請參閱