CryptographicBuffer.DecodeFromHexString(String) CryptographicBuffer.DecodeFromHexString(String) CryptographicBuffer.DecodeFromHexString(String) CryptographicBuffer.DecodeFromHexString(String) CryptographicBuffer.DecodeFromHexString(String) Method

Definition

Decodes a string that has been hexadecimal encoded.

public : static IBuffer DecodeFromHexString(Platform::String value)
static IBuffer DecodeFromHexString(winrt::hstring value) const;
public static IBuffer DecodeFromHexString(String value)
Public Shared Function DecodeFromHexString(value As String) As IBuffer
var iBuffer = Windows.Security.Cryptography.CryptographicBuffer.decodeFromHexString(value);

Parameters

value
String String String

Encoded input string.

Returns

Output buffer that contains the decoded string.

Examples

public void EncodeDecodeHex()
{
    // Define a hexadecimal string.
    String strHex = "30310AFF";

    // Decode a hexadecimal string to binary.
    IBuffer buffer = CryptographicBuffer.DecodeFromHexString(strHex);

    // Encode the buffer back into a hexadecimal string.
    String strHexNew = CryptographicBuffer.EncodeToHexString(buffer);
}