Questions tagged [hashcode]
Hashcode is a result of applying a hash function to data, usually an integer.
136
questions
1
vote
3
answers
123
views
Sign a message with a Bitcoin private key
I am writing code in C, and I need to do various operations with Bitcoin, from generating key pairs, to sign messages to post transactions. I found libraries for C++, but nothing in C that does all ...
1
vote
1
answer
103
views
An immutable class that contains Dictionary properties and needs a distinct hash code based on those Dictionaries
I have a Job class that represents jobs in a manufacturing system. The idea is that a job requires some quantity of certain materials, and it outputs some quantity ...
0
votes
1
answer
47
views
Locality Sensitive Hashing using Random Projection method
Can you review the following Python code?
...
1
vote
1
answer
264
views
Collecting hashes of all files in a folder and its subfolders into a dictionary in Python
What I am doing here is iterating through all the files in the parentFolder and its subfolders collecting all the hashes of all the files and putting them into a ...
5
votes
1
answer
296
views
Most compact data format for a shopping cart
I'm trying to build a format that can represent the user's cart on my website in the most compact way. The website is related to computer parts and there are 23 product categories. Each product has an ...
12
votes
2
answers
6k
views
Laughably tiny random engine
I devised a tiny pseudo-random engine and I wondered if it would be considered decent or even good.
It is based on a SHA256 implementation and uses a single 32-bytes state variable.
On seeding, the ...
2
votes
2
answers
414
views
C++ distributed enumeration alternative
Application: replacing enum type / description tags in modular software, allowing adding new enum values without updating one definition.
Say we have a video processing pipeline not unlike gstreamer. ...
3
votes
1
answer
428
views
Deterministically hash dictionary
I need to compute a deterministic hash for a JSON-serializable dictionary.
This answer almost does the job, but there are a few problems.
If dict1 == dict2 then I ...
2
votes
1
answer
462
views
Password hashing for safe storage with Argon
This code snippet implements password hashing for safe storage. It uses Argon2 as hashing algorithm. The method hash_password() is used to hash and salt a password. ...
0
votes
2
answers
949
views
Encryption and Decryption in C
I have written a program in C, which encrypts and decrypts a c-styled string (const char *) and print the result to stdout. It ...
0
votes
3
answers
181
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 ...
1
vote
1
answer
206
views
Python: Generate SHA3 hashes for files with custom rate and capacity values
I am working on a project which requires comparing the performance of SHA3 on different values of rate and capacity. I have implemented the same in Python and my program works fine, however, the ...
2
votes
1
answer
1k
views
Hashing with python optimization, hashlib and multiprocessing
I am looking to get any type of improvement, I want to be able to hash a list of 'blocks' aka strings and check if hashes match per block, if you can help me with that, currently reading and writing ...
1
vote
1
answer
90
views
A simple Java integer integer hash set - follow-up 2
(See the previous version.)
Now I have this:
com.github.coderodde.util.IntHashSet:
...
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:
...