Generating API tokens using node - upper and lower case letters and numbers?
<p>I am trying to generate <strong>unique</strong> keys/ tokens in expressjs. I am using <a href="https://www.npmjs.com/package/hat" rel="nofollow">hat</a>. But the key it generates is in numbers and lowercase letters:</p>

<pre><code>1b1a7af4e304fc0fa49216ce248ae574
</code></pre>

<p>My code:</p>

<pre><code>var express = require('express');
var hat = require("hat");
var app = express();

app.get('/', function (req, res) {
    res.send(hat());
});
</code></pre>

<p>But I prefer keys like this (mixture of lower and upper case and numbers):</p>

<pre><code>EzpoQlgvQESADxzAQX94uwPgoYX
</code></pre>

<p>Any ideas what node package I should use to create key like that (mixture of lower and upper case and numbers)?</p>

<p>What are the differences between these two types of keys by the way? Which is safer and better?</p>