From ba4ebc05ef3af4d8ef13fdda88f4352b8d5a0c32 Mon Sep 17 00:00:00 2001 From: "Kar l5.G" Date: Wed, 2 Apr 2025 19:13:08 +0530 Subject: [PATCH] SiliconID --- readme.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..21c12df --- /dev/null +++ b/readme.md @@ -0,0 +1,29 @@ +SiliconID - a better/replacement of UID +Capablity: Uniqueness, Limited Length along with Sortability + +i used to use a function using php to generate randome string, +intent to use replacement of UID, so i can use this on DOS +system (max 8 char constrain) + +i needed Uniqueness, Limited Length along with Sortability. +Options i had +on dos + @echo off + set /a num=%random%%%100000000 + echo %num% +on linux/bsd +cat /proc/sys/kernel/random/uuid | cut -c1-8 +date +%s%N | sha256sum | base64 | head -c 8 + + +lets re-implement SiliconID maintaining Uniqueness to reduce collisions +having Limited Length along with Sortability + +keeping in mind: + 1. Custom Epoch is supported by every modern programming Language. + 2. Can start with 2020 + 3. Timestamp with mili second + 4. [timestamp (10 digits)] + [random number (5 digits)] = 15-digit decimal + 5. Encoding 14-digit decimal into Base-62 gives exactly 8 chars + +