diff --git a/index.js b/index.js index 8bfc1ad..350cd4b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ "use strict"; function btoa(str) { - return new Buffer(str, 'utf8').toString('base64'); + return new Buffer(str, 'binary').toString('base64'); } module.exports = btoa;