nodejs crypto create salt code example Example: how to generate a random salt in nodejs var buf = crypto.randomBytes(16);