Questions tagged [hashcode]
Hashcode is a result of applying a hash function to data, usually an integer.
139 questions
6 votes
4 answers
771 views
InsertOnlyHashSet in C++
First C++ project: write a hash set for a specific scenario where I only need inserts and containment checks. This is not AI slop, everything except for the avalanche function is hand written. Please ...
4 votes
2 answers
153 views
Checksum files in a directory with Python, memory-efficiently
This is the implementation of a function hash_dir_contents that walks through a directory and for every file calculates the hash of its content in a memory-...
1 vote
3 answers
178 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
72 views
Locality Sensitive Hashing using Random Projection method
Can you review the following Python code? ...
5 votes
1 answer
332 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 ...
2 votes
2 answers
452 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. ...
2 votes
1 answer
532 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
3 answers
247 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 ...