Ads 468x60px

##EasyReadMore##

01 8月, 2017

Base64 Encoding / Decoding in Node.js

Here is how you encode normal text to base64 in Node.js:

var b = new Buffer('JavaScript');
var s = b.toString('base64');
// SmF2YVNjcmlwdA==

And here is how you decode base64 encoded strings:

var b = new Buffer('SmF2YVNjcmlwdA==', 'base64')
var s = b.toString();
// JavaScript
you can use this website to vertify before
Base64 Decode and Encode - Online - https://goo.gl/5u66uy

Refer:
Base64 Encoding / Decoding in Node.js - https://goo.gl/CcwmLp

0 意見:

張貼留言

 
Blogger Templates