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

  • Home
  • SEARCH
  • 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 8414243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:07:01+00:00 2026-06-10T01:07:01+00:00

There was a hash algorithm that I came across some time ago that was

  • 0

There was a hash algorithm that I came across some time ago that was quite useful for small files. From memory the algorithm itself was very simple. It involved adding the hash with the next byte and multiplying by some fixed number (33 maybe?) then there was a bit shift at the end.

The pseudocode looked something like the following:

for each byte:
    x = nextbyte * 33
    hash += x
    hash <<= 4

Does anyone know the name of this hash algorithm?

  • 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-06-10T01:07:03+00:00Added an answer on June 10, 2026 at 1:07 am

    It looks like the java hash code algorithm:

    public static int calculateHash(String input) {
        int h = 0;
        int len = input.length();
        for (int i = 0; i < len; i++) {
            h = 31 * h + input.charAt(i);
        }
        return h;
    }
    

    But it in case this is not true try scrolling through the list of hash functions

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

Sidebar

Related Questions

Is there an algorithm that will yield the same hash for two numbers, no
I have a filesystem that uses a hash algorithm to organize files. I have
Is there a hash function that returns a 16-digit hex value (as MD5 returns
Is There a way to do an hash map in javascript that holds 1
Is there any chance that a SHA-1 hash can be purely numeric, or does
is there any function in C++ that calculates a fingerprint or hash of a
I need to hash with md5 algorithm a string in my program. There is
I need an hash algorithm that outputs an alphanumeric string that is max 20
is there an algorithm available for Java that will allow me to keep adding
I want to implement an algorithm that needs to use a hash tree. What

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.