npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ql-qrng

v1.0.9

Published

test project

Downloads

26

Readme

const qrng = require("ql-qrng")\

The utilization of Quantum Random Number Generator (QRNG) technology has the potential to transform various industries by providing an unparalleled level of security for transactions and data. QRNG employs photon detectors to generate random numbers, making it impossible to tamper with, as the outcome of any measurement of a quantum system is unpredictable. This unpredictability can be harnessed to produce genuinely random numbers.\

QRNGs find crucial applications in areas such as cryptography, where genuinely random numbers are indispensable for safeguarding communication and encrypting data. Additionally, they are used in scientific research, simulations, and other sectors like banking, which necessitate the use of truly random numbers.\

Using the NPM package, clients can extend the functionality of the random number generation service:

- hexadecimal(bits)

- decimal(bits)

- getQuantumHash(bits)

hexadecimal(bits)

  1. hexadecimal(bits): Clients encode their parameters in binary and send a message to the server using the MPM package, specifying the operation "generate_hexadecimal". The server, subscribed to the "generate_hexadecimal" channel, processes the binary parameters, generates the hexadecimal number, and sends it back to the client through the MPM infrastructure.
const otp = await qrng.hexadecimal(bits);

decimal(bits)

  1. decimal(bits): Clients craft a message with their binary parameters, indicating the operation "generate_decimal", and transmit it to the server via the MPM package. Upon reception, the server interprets the binary parameters, performs the random decimal number generation, and returns the result to the client through the message-passing middleware.
const otp = await qrng.decimal(bits);

getQuantumHash(bits)

  1. getQuantumHash(bits): Clients construct a message containing their binary parameters and specify the operation "get_quantum_hash". They then dispatch this message to the server through the MPM package. The server, having subscribed to the "get_quantum_hash" channel, processes the binary parameters upon receipt, generates the quantum hash, and transmits it back to the client via the MPM system, ensuring the integrity and reliability of the communication channel.
const otp = await qrng.getQuantumHash(bits);

By leveraging the MPM package, these functionalities enhance the capabilities of the random number generation service provided by the REST API, enabling clients to seamlessly utilize additional features through efficient message passing between clients and the server.

Random Number Generation REST API

This REST API provides endpoints for generating random numbers in various formats. The API accepts parameters encoded in bits format, allowing you to request random numbers via HTTP interface.

Endpoints

1. qrngHex/

  • Method: GET
  • Description: Generates a random hexadecimal number.
  • Parameters:
    • Bits Format

2. qrngDecimalNumber/

  • Method: GET
  • Description: Generates a random decimal number.
  • Parameters:
    • Bits Format

3. qrngDecimalArray/

  • Method: GET
  • Description: Generates an array of random decimal numbers.
  • Parameters:
    • Bits Format

4. qrngHexArray/

  • Method: GET
  • Description: Generates an array of random hexadecimal numbers.
  • Parameters:
    • Bits Format

Usage

Random number generation through a REST API that accepts parameters through binary means that you can request random numbers via an HTTP interface, where the input parameters are encoded in binary format.

  1. qrngHex/
  • This endpoint could be part of a quantum random number generator (QRNG) service, which generates random numbers based on quantum mechanical processes. Requesting from this endpoint likely returns a single random number in hexadecimal format. The parameters passed in binary could specify constraints or characteristics of the generated number, such as its range or precision.
  1. qrngDecimalNumber/
  • This endpoint might generate a single random decimal number. The parameters provided in binary could influence the distribution of the generated number, such as its mean or standard deviation, or specify any constraints like minimum and maximum values.
  1. qrngDecimalArray/
  • This endpoint could return an array of random decimal numbers. The binary parameters might dictate the size of the array and any additional characteristics of the generated numbers, similar to the previous endpoint.
  1. qrngHexArray/
  • Similar to qrngDecimalArray, this endpoint would return an array of random hexadecimal numbers, with binary parameters specifying array size and other relevant factors.

In technical terms, clients would interact with these endpoints by sending HTTP requests, possibly using POST methods for more complex requests with binary data. The server-side implementation would parse the binary parameters, configure the quantum random number generation process accordingly, and respond with the requested random numbers in the specified format or structure, adhering to RESTful principles. Additionally, authentication and authorization mechanisms might be in place, especially for administrative functionalities, to ensure secure access and proper management of the system.

Happy Coding :)