note on urlsafe base64

This commit is contained in:
AJ ONeal 2018-11-24 17:37:23 -07:00
parent 6cd0c28b86
commit c17f0338e1

View file

@ -98,5 +98,6 @@ Enc.urlBase64ToBase64 = function urlsafeBase64ToBase64(str) {
Enc.base64ToBuf = function base64ToBuf(str) { Enc.base64ToBuf = function base64ToBuf(str) {
// always convert from urlsafe base64, just in case // always convert from urlsafe base64, just in case
//return Buffer.from(Enc.urlBase64ToBase64(str)).toString('base64'); //return Buffer.from(Enc.urlBase64ToBase64(str)).toString('base64');
// node handles urlBase64 automatically
return Buffer.from(str, 'base64'); return Buffer.from(str, 'base64');
}; };