joyent/node — Issue #2531: Url-safe base64 encoding
Author: subhog
Created: 2012-01-13 20:07:22+00:00
State: open

The `crypto.randomBytes` method would be great for several typical use cases, like generating random URL tokens. However, the included 'base64' encoding is not URL-safe, as it includes + and / instead of - and _. It would be great if `buffer.toString` method could accept a 'base64-url' encoding to use the generated string in URLs and file names.