Giter VIP home page Giter VIP logo

7id's Introduction

7ID

Random base32 (RFC 4648 without padding) string generator for unique ID usage.

This library includes the function generate(), which accepts a number of bytes to be used by crypto on it's function randomBytes().

The proportion of characters generated and the length of bytes requested is 5/16 (0.3125). Each 5 bytes, 16 characters are generated. 10 bytes output is a string of 32 characters.

Collision probability

The probability depends on the bytes length informed.

On a practical test of collision, the genetions that colided was:

Generations
16690357
20813326
30091557
30288983
40839999
43867276
44935582
(…)

Usage

Example

const thitySixID = require('7id')

let result = thitySixID.generate(6)

console.log(result)

Output example

'G42WCY3CMVSTOOLGGIYQ'

7id's People

Contributors

gumieri avatar

Stargazers

Craig Edwards avatar Robby Dhillon avatar  avatar Marcos Florencio avatar

Watchers

Osvaldo Zonetti avatar  avatar James Cloos avatar Fábio Rogério SJ avatar  avatar Tecnospeed TI avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.