Wednesday, August 2, 2017

Encoding and decoding in Javascript using base64


var testString = "My testing Application";

// Encode the String
    var encodedString = btoa(testString);
    console.log(encodedString);


// Decode the String
    var decodedString = atob(encodedString);
    console.log(decodedString);

No comments:

Post a Comment