rrid
v1.0.6
Published
To create a random request id!
Downloads
31
Readme
Quickstart
====================
To create a random RRID...
======================================
1. Install
npm install rrid
2. Import package
const rrid = require('rrid');
3. Create a RRID
rrid.v(); // ⇨ '8e8684e9dfc9e290f31d0353cdfac303'
rrid.v1(); // ⇨ '52d3e7f2-bea3c-a872f1-11458-eb8e9a54'
rrid.v2(); // ⇨ 'c034f936-c2a59c7f-30002902-b17f3e26'
rrid.v3(); // ⇨ '0a4124d8-96941a-cf92-1ec84a-fcfc76cf'
rrid.v4(); // ⇨ '8c439a-6a75014-5e258b-b2dffac-f99ad5'
rrid.v5(); // ⇨ 'e55ecff51d-8c1d8d-8cbefd-5e50096578'
rrid.v6(); // ⇨ '0cbc2d209e55-28ab8f56-00de9d1bfff5'
const arr = [5,16,28];
rrid.diy(arr); // ⇨ '8e784-2c7108c04f-4610c70dd99-7c27c2'
4. Create a KEY
rrid.key(32); // ⇨ 'YrQR4e9pjwzUhNtjYzKb9BRiTagV8Vlt'
rrid.key(64); // ⇨ 'FIsbgbyMhC6bPD7D5RyLzoxGtVAjlRa9pCMbE9tAWIuYt4nQhb3jbsLySBKnQIsD'
5. Create a md5
const data = 'How are you?';
rrid.md5(data); // ⇨ '04e35eb3e4fcb8b395191053c359ca0e'
6. Create a encryption
const key = '95191053c359ca0e';
const data = 'How are you?';
rrid.ekey(data); // ⇨ 'V/+/EYPN8yzJW4FMkFNEfQ=='
rrid.ekey(data,key); // ⇨ 'DsCkoGBfpjNGi1HiUQ7V+Q=='
7. Decrypt a Encrypted text
const key = '95191053c359ca0e';
const data1 = 'V/+/EYPN8yzJW4FMkFNEfQ==';
const data2 = 'DsCkoGBfpjNGi1HiUQ7V+Q==';
rrid.dkey(data1); // ⇨ 'How are you?'
rrid.dkey(data2,key); // ⇨ 'How are you?'
8. Get version number
rrid.version; // ⇨ '1.0.6'