Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CryptographicBuffer.DecodeFromBase64String | decodeFromBase64String method

Applies to Windows and Windows Phone

Decodes a string that has been base64 encoded.

Syntax


var iBuffer = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(value);

Parameters

value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

Base64 encoded input string.

Return value

Type: IBuffer

Output buffer that contains the decoded string.

Remarks

Base64 processes data as 24-bit groups, mapping each group to four encoded 8-bit characters. Base64 encoding is sometimes referred to as 3-to-4 encoding. Each 6 bits of the 24-bit group is used as an index into a mapping table (the base64 alphabet) to obtain a character for the encoded data.

Examples


public void EncodeDecodeBase64()
{
    // Define a Base64 encoded string.
    String strBase64 = "uiwyeroiugfyqcajkds897945234==";

    // Decoded the string from Base64 to binary.
    IBuffer buffer = CryptographicBuffer.DecodeFromBase64String(strBase64);

    // Encode the buffer back into a Base64 string.
    String strBase64New = CryptographicBuffer.EncodeToBase64String(buffer);
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography
Windows::Security::Cryptography [C++]

Metadata

Windows.winmd

See also

CryptographicBuffer

 

 

Show:
© 2014 Microsoft