Created
September 15, 2015 03:08
-
-
Save tylerpeterson/351e532cfa1ec7a66f9d to your computer and use it in GitHub Desktop.
Node Base64
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
#!/usr/local/env node | |
new Buffer('payload').toString('base64'); // 'cGF5bG9hZA==' | |
new Buffer('cGF5bG9hZA==', 'base64').toString('ascii'); // 'payload' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment