Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
3 answers
222 views

Hash function based on ISBN

I'm trying to create a hash function for my own custom class. It uses a string value of 4 chars as a key, which is unique to every object, which I then encode using getBytes(), the part actually used ...
EddyDantes's user avatar
1 vote
1 answer
108 views

A simple Java integer integer hash set - follow-up 2

(See the previous version.) Now I have this: com.github.coderodde.util.IntHashSet: ...
coderodde's user avatar
  • 31.3k
6 votes
4 answers
1k views

A simple Java integer hash set

(See the next version.) The following data structure implements a hash table based set for int values: ...
coderodde's user avatar
  • 31.3k
4 votes
1 answer
219 views

Securely hash passwords

Since hashing algorithms isn't something to mess around with as a beginner. Several howto's explain that one should use already made solutions. Examples of such pages: https://crackstation.net/hashing-...
brat's user avatar
  • 143
3 votes
1 answer
200 views

Hashing array of strings as Merkle tree in one function

I want to hash an array of strings into one hash as shown on scheme on the image below. But I do not want to implement some class based Merkle tree. It's just a simple function. Is this a good ...
Michal's user avatar
  • 131
7 votes
2 answers
962 views

Finding collisions of the first few bits of a SHA-1 hash

My objective is to find a hash collision of my modified hash function. Assuming my modified hash only outputs the first 36 bits of SHA-1. As we know, SHA-1 is a 160-bit hash value, hence, we only need ...
Astral Zhang's user avatar
0 votes
1 answer
135 views

HashMap Implemention in Java

I just finished implementing a HashMap in Java, with methods: add(String key, Integer value) get(String key) ...
Henry Zhu's user avatar
  • 101
2 votes
1 answer
1k views

Using Java to implement a hash table (dictionary) with only arrays

I'm new to hash codes/hash tables, so I'm very unsure of my implementation. I want to create a hash table, but I can only use arrays. Specifically, I want to be able to insert things like a dictionary ...
user9597527's user avatar
0 votes
1 answer
1k views

Reading bytes from file to compute its SHA256 hash

I need to get text hash (sha 256), so I need to convert file to its type representation. Is this a fast way to get a byte representation of a file? ...
sherif's user avatar
  • 11
4 votes
2 answers
2k views

Simple hashing and salting algorithm

I have devised what I feel to be a simple hash/salting algo for Java, and am looking for some feedback from people more skilled than myself. Please find below my code; ...
Michael Wiggins's user avatar
1 vote
1 answer
564 views

Implementing feature hashing using guava

I am trying to implement feature hashing in Java. For this I am trying to use Hashing functions from guava. This is how I am doing it now: ...
Sayan Pal's user avatar
  • 149
4 votes
1 answer
481 views

Generating Signatures of Tree Structures using an Order-Independent Hash

I'm working with a file format which stores data as a tree. Each node in the tree is known as a Tag, and every tag has a name ...
jocopa3's user avatar
  • 143
1 vote
4 answers
3k views

Java class to compute and get a MD5 hash as a string

Here is my class file to compute MD5 hashes on a file. I wanted to be able to easily calculate them without having to create a lot of overhead in the code using the class. Can anyone tell me a list ...
SteelToe's user avatar
  • 113
2 votes
3 answers
7k views

String hash generator

There is a lot of code duplication because it generates hashes using multiple cryptographic hash algorithms. How can I improve this code? ...
Anonymous's user avatar
3 votes
4 answers
2k views

Optimizing Java SHA-512 String-to-Hash Generator

In an attempt to learn Java and SHA-2 I created a very simple String-to-SHA512 generator. Here is the code: ...
Anonymous's user avatar

15 30 50 per page