trng

0.0.1 • Public • Published

trng

A True Random Number Generator (TRNG) module for Node.js that generates highly random data by combining multiple sources of entropy.

Features

  • Generates random data by combining multiple sources of entropy.
  • Output is provided as a hexadecimal string.
  • Configurable output length.

Installation

npm install trng

Usage

const trng = require("trng");
var length = 32;

trng.generate(length, function(randomHexString) {
  console.log("Random hex string:", randomHexString);
});

trng.generate(length, callback)

  • length: The desired length of the generated random hexadecimal string.
  • callback: A callback function that takes the generated random hexadecimal string as a parameter.

Example

const trng = require("trng");

trng.generate(32, function(randomHexString) {
  console.log("Random hex string (32 characters):", randomHexString);
});

License

GNU General Public License v3.0

Copyright 2023 Bufferstack.IO Analytics Technology LLP, Pune

See the LICENSE file for more details.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i trng

      Weekly Downloads

      0

      Version

      0.0.1

      License

      GPL-3.0

      Unpacked Size

      3.43 kB

      Total Files

      3

      Last publish

      Collaborators

      • hj91