Created
March 18, 2019 00:26
-
-
Save christophersjchow/b4b687f332e8e228524132f76b566f1b to your computer and use it in GitHub Desktop.
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
var crypto = require('crypto'); | |
var base64url = require('base64url'); | |
/** Sync */ | |
function randomStringAsBase64Url(size) { | |
return base64url(crypto.randomBytes(size)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment