Encoding data (HTML)

Applies to Windows and Windows Phone

The following example shows how to use the encodeToBase64String to encode a buffer to a base64 string.



function EncodeData( encryptedDataBuffer )
{

    try {

        // Encode a data buffer to a base64 string.
        var base64String = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(encryptedDataBuffer);

    }
    catch ( ) {

        // Handle the error.
    }
}

Related topics

Decoding data
Encoding and decoding data

 

 

Show:
© 2015 Microsoft