question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate hashid using string as input

See original GitHub issue

Is it possible to create a short unique hashid from a string?

I need to generate a short id from uuid like 2b8b9396-0cdf-4b9c-a03d-b25e1d93601b

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
pmsoltanicommented, Sep 12, 2019

Quoting the Hashids website:

Do not encode strings. We’ve had several requests to add this feature — “it seems so easy to add”. We will not add this feature for security purposes, doing so encourages people to encode sensitive data, like passwords. This is the wrong tool for that.

Suggesting this issue to be closed.

0reactions
TechCometcommented, Sep 1, 2021

print(Hashids('Enter string here').encode(1, 2, 3))

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hashids - generate short unique ids from integers
Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers. It converts numbers like 347 into strings like “yr8”,...
Read more >
Generate ID from string in Python - hash - Stack Overflow
My code so far: hash(s) % 10000000000 . The input string(s) which I can expect will be in range of 12-512 chars long....
Read more >
Generating hash id's using uuid3() and uuid5() in Python
Cryptographic hashes can be used to generate different ID's taking NAMESPACE identifier and a string as input. The functions that support ...
Read more >
String.GetHashCode Method (System) - Microsoft Learn
Returns the hash code for this string using the specified rules. ... The following example demonstrates the GetHashCode method using various input strings....
Read more >
Hashids - What Are They, And Why Should We Use Them?
One solution is to use Hashids (Hash ID Values)… Hashids are an effective approach for generating opaque non-sequential IDs derived from numbers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found