Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3697334
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:50:50+00:00 2026-05-19T04:50:50+00:00

I have a large and unique integer (actually a SHA1 hash). Note: While I’m

  • 0

I have a large and “unique” integer (actually a SHA1 hash).

Note: While I’m talking here about SHA1 hashes, this is not a cryptography / security question! I’m not trying to break SHA1. Imagine a random 160-bit integer instead of SHA1 if that will help.

I want (for no other reason than to have fun) to find an algorithm to map that SHA1 hash to a computer-generated (pseudo-)English phrase. The mapping should be bidirectional (i.e., knowing the algorithm, one must be able to calculate the original SHA1 hash from that phrase.)

The phrase need not make sense. I would even settle for a whole paragraph of nonsense. (Though quality — englishness — of a paragraph should probably be better than for a mere phrase.)

A better algorithm would produce shorter, more natural-looking, more unique phrases.

A variation: it is OK if I will be able to work only with a part of hash. Say, first six hex digits is fine.

The possible usage of the generated phrase: the human readable version of Git commit ID, to use as a motto for a given program version, which is built from that commit. (As I said, this is “for fun”. I don’t claim that this is very practical — or be much more readable than the SHA1 itself.)

Possible approach: In the past I’ve attempted to build a probability table (of words), and generate phrases as Markov chains, seeding the generator (picking branches from probability tree), according to the bits I read from the SHA. This was not very successful, the resulting phrases were too long and ugly. I’m not sure if this was a bug, or the general flaw in the algorithm, since I had to abandon it early enough.

Now I’m thinking about attempting to solve the problem once again. Any advice on how to approach this? Do you think Markov chain approach can work here? Something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:50:51+00:00Added an answer on May 19, 2026 at 4:50 am

    A very simple approach would be:
    Take list of say 1024 nouns, 1024 verbs and 1024 adjectives each. Your phrase could then be sentence of the form

    noun[bits_01-10] verb[bits11-20] adjective[bits21-30] verb[bits31-40],
    noun[bits_41-50] verb[bits51-60] adjective[bits61-70] verb[bits71-80],
    noun[bits_81-90] verb[bits91-100] adjective[bits101-110] verb[bits111-120] and 
    noun[bits_121-130] verb[bits131-140] adjective[bits141-150] verb[bits151-160].
    

    With a bit more linguistic thought you can probably construct slightly more complicated ad thus not so repetitive looking sentences (say, a bit for singular / plural, a bit of two for different tenses,…). Longer word lists use up a few more bits but my guess is that you reach rather exotic words quite fast.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this string here: CREATE UNIQUE INDEX index555 ON SOME_TABLE ( SOME_PK ASC
I have a large collection of small objects, each has a unique string ident.
I have large sqlite Dabase file I read this post I am not able
I have large data sets (10 Hz data, so 864k points per 24 Hours)
I have large batches of XHTML files that are manually updated. During the review
I'm developing a website in PHP and I have large JS files that I
I have a large tree of Java Objects in my Desktop Application and am
I have a large codebase that targetted Flash 7, with a lot of AS2
I have a large database and would like to select table names that have
I have a large table with 1 million+ records. Unfortunately, the person who created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.