Converting data (HTML)
The following example shows how to use the convertStringToBinary method to convert a text string to a binary string.
function ConvertData( password )
{
try {
// Convert the password to a binary string.
var secret = Windows.Security.Cryptography.CryptographicBuffer.convertStringToBinary(password, Windows.Security.Cryptography.BinaryStringEncoding.utf8);
}
catch ( ) {
// Handle the error.
}
}