Comments (4)
@4kimov Thanks for the suggestion, appreciate the timely response on a Sunday :)
from sqids-javascript.
Hi @KieronWiltshire, unfortunately that's not in the plans for several reasons:
- Hex strings are common among hashes, and Sqids should not encourage encoding or obfuscating sensitive data
- Added complexity from having to decide how to split the hex string for encoding
However, if you have a legitimate use-case, you can always wrap the library into custom code
from sqids-javascript.
The use case I have here is neither, I have UUIDs that I want to use in URL, but UUIDs are large and won't be consistent with other URLs.
Was hoping to convert UUIDs to hex, hash ID them, then reverse the process for lookups.
from sqids-javascript.
Thanks for the feedback, makes sense. In this case, I think #2
from above would still apply. I'll keep an open mind and see if the community demand is there as the library progresses.
In the meantime, you could try to wrap your code with these: https://github.com/niieani/hashids.js/blob/master/src/hashids.ts#L150-L190
from sqids-javascript.
Related Issues (15)
- First push HOT 10
- Where is encodeHex()? HOT 1
- Sqids does not support Node.js >= 16 HOT 3
- Support passing in a salt for unique IDs per object type HOT 1
- Missing Node Support HOT 4
- Suggested strings for blocklist: suck and 5uck HOT 1
- Submit to cdnjs
- Impossible to filter out certain words because they are too short HOT 1
- How to check Error: Invalid ID like "https://sqids.org/playground" HOT 1
- Broken packaging: Unexpected token 'export' HOT 1
- BigInt support HOT 1
- Output from hashids and sqids for the same input is different HOT 2
- ReferenceError: Blob is not defined (NodeJS 16) HOT 1
- Create a function to check if the const encoded is valid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqids-javascript.