Created
October 1, 2016 13:34
-
-
Save fengminchao/dab99d7a4a3f60c9cf958824ff5524fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function encodeBase64(s) { | |
var b = new Buffer(s); | |
return b.toString('base64'); | |
} | |
function decodeBase64(s) { | |
var b = new Buffer(s, 'base64') | |
return b.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment