lib/jwt.js
function keygen (alg) {
    var algs =
        { 'HS256': 256/8
        , 'HS512': 512/8
        , 'A128CBC+HS256': 256/8
        , 'A256CBC+HS512': 512/8
        };
    if (!algs[alg]) return null;
    return (b64url.encode(crypto.randomBytes(algs[alg])))
}
function keygen (alg) {
    var algs =
        { 'HS256': 256/8
        , 'HS512': 512/8
        , 'A128CBC+HS256': 256/8
        , 'A256CBC+HS512': 512/8
        };
    if (!algs[alg]) return null;
    return (b64url.encode(crypto.randomBytes(algs[alg])))
}
function keygen ( alg ) { var algs = { 'HS256' : 256 / 8 , 'HS512' : 512 / 8 , 'A128CBC+HS256' : 256 / 8 , 'A256CBC+HS512' : 512 / 8 } ; if ( ! algs [ alg ] ) return null ; return ( b64url . encode ( crypto . randomBytes ( algs [ alg ] ) ) ) }
generates a key for the passed algorithm
generates a key for the passed algorithm