HttpServerUtility.UrlTokenEncode(Byte[]) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將位元組陣列編碼成其等效的字串表示,使用基數 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[]
要編碼的位元組陣列。
傳回
若位元組 陣列長度 大於一,則包含編碼標記的字串;否則,則為空字串(“”)。
例外狀況
參數的 input 值為 null。
備註
此 UrlTokenEncode 方法將位元組陣列轉換為以 64 位進位編碼的等效字串表示。 所得的字串標記可在 URL 上傳送。
若input參數長度小於一,則UrlTokenEncode會回傳空字串。