You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that new Buffer(str, "base64") accepts both RFC 3548 (+,/) encoding as well as RFC 4648 (-,_) encoding:
(node v5.6.0)
> a
'lCH34wWsR0Ap3KsGZQfIpJKid73f7bbkdPBkX7CV8zukgF-K__H2CKVD'
> b
'lCH34wWsR0Ap3KsGZQfIpJKid73f7bbkdPBkX7CV8zukgF+K//H2CKVD'
> new Buffer(a, "base64").equals(new Buffer(b, "base64"));
true
[-,_] encoding may be referred to as "base64url". This encoding
should not be regarded as the same as the "base64" encoding and
should not be referred to as only "base64". Unless clarified
otherwise, "base64" refers to the base 64 in the previous section.
I prefer the "base64url" encoding, so I'm not asking to have it removed. But I would like to know if this is "officially" supported as part of the API and is not going to change moving forward? I didn't find anything in the documentation.
The text was updated successfully, but these errors were encountered:
Hi,
I noticed that
new Buffer(str, "base64")
accepts both RFC 3548 (+
,/
) encoding as well as RFC 4648 (-
,_
) encoding:According to RFC 4648:
I prefer the "base64url" encoding, so I'm not asking to have it removed. But I would like to know if this is "officially" supported as part of the API and is not going to change moving forward? I didn't find anything in the documentation.
The text was updated successfully, but these errors were encountered: