Coder Social home page Coder Social logo

Support hex about sqids-javascript HOT 4 CLOSED

KieronWiltshire avatar KieronWiltshire commented on May 31, 2024
Support hex

from sqids-javascript.

Comments (4)

KieronWiltshire avatar KieronWiltshire commented on May 31, 2024 1

@4kimov Thanks for the suggestion, appreciate the timely response on a Sunday :)

from sqids-javascript.

4kimov avatar 4kimov commented on May 31, 2024

Hi @KieronWiltshire, unfortunately that's not in the plans for several reasons:

  1. Hex strings are common among hashes, and Sqids should not encourage encoding or obfuscating sensitive data
  2. 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.

KieronWiltshire avatar KieronWiltshire commented on May 31, 2024

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.

4kimov avatar 4kimov commented on May 31, 2024

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)

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.