Skip to content

traceless/GenerateCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

GenerateCode.js

it used to produce 7 bit string, can be produced by quantity, not duplicated, can be verified.

easy to use

1、'cipher' you need to save, 'start' it need increase last sum value if you want to produced code in next time;

const generateCode = require('generateCode');
const cipher = generateCode.noRepeatStr(36); //example: DJosIOVYlEmahcr6Mf4dSCBqzNX1bPwteyGL
const start = 123; 
const sum = 200;
const codeArray = generateCode.generate(cipher, start, sum);
console.info(codeArray);

2、how to verified?

const generateCode = require('generateCode');
const isValidate = generateCode.validate('DFda3j3', 'DJosIOVYlEmahcr6Mf4dSCBqzNX1bPwteyGL'); 
console.info('isValidate:' + isValidate);

end

The code is very simple, you are so smart and you must be understand.

About

it Used to produce 7 bits of non duplicate code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors