hexadecimal-gen

Generating a random hexadecimal numer of bits.

Usage no npm install needed!

<script type="module">
  import hexadecimalGen from 'https://cdn.skypack.dev/hexadecimal-gen';
</script>

README

Hexadecimal Generator

A simple random hexadecimal generator.

Installation

npm install hexadecimal-gen

Usage

var hgen = require('hexadecimal-gen');

var hex = hgen(128);
console.log(hex); // Outputs something like: 128d93ec4e4c737bbeae10c35db6becb

API

hgen(bits)

The bits parameter indicates how many bits should be generated and expressed as hexadecimal. If bits is omitted the default will be 64 bits (16 hex characters).