Hashcode is a result of applying a hash function to data, usually an integer.
10
votes
2answers
418 views
Override equals() and hashCode() using reflection
I wrote a utility method to override equals() using reflection. This works fine, but I wonder if this code will pass all the tests.
...
5
votes
1answer
54 views
Eliminating repetitiveness in code to test hash functions
I usually take my school code as a playground to mess around with things. I was given a bunch of premade hash functions and had to test their output and find when they reach a specific lower range. ...
4
votes
3answers
113 views
Anything wrong with this equals and hashCode implementation?
The below is the domain class called WordType which has Id as its unique DB generated value and Name and Description as other values.
I was going through the 'Effective Java' resource by Joshua ...
4
votes
1answer
51 views
A PHP Toolkit of some functions
Any major security risks? And please don't get angry over my novice log system.
...
4
votes
1answer
102 views
Generating random and secure CSRF tokens
I googled around for secure random number generation and random string generation, combining them with some user data.
Is this good or am I totally off-base? I don't know much about cryptography but ...
3
votes
1answer
311 views
Implementation of the FNV-1a hash algorithm for 32- and 64-bit
Are there any improvements to these two classes which implement FNV-1a for hashing? Particularly, I'm looking for any reuse opportunities (possibly via a common abstract superclass derived from ...
3
votes
1answer
19 views
Enhancing speed of looping cycle using Freepascal
I use Lazarus 1.2.4 and Freepascal 2.6.4.
I have created a program that reads a disk in buffers of 64Kb (tried various buffer sizes) using a repeat...until loop. Each buffer is hashed using the SHA1 ...
2
votes
2answers
171 views
Computing hash of string
I want my code to be reviewed and I'd like to hear your opinions.
Sun's code to compute hash of string:
...
2
votes
3answers
201 views
2
votes
1answer
75 views
Is this correct for hashing a password?
Does this look like a good method to hash a user password. I'm not very familiar with how this whole hashing process works and below is a bunch of stuff I've seen on many different posts.
My main ...
1
vote
1answer
81 views
Is this a good practice of password salt/hash? [closed]
Original: http://www.php.net/manual/en/function.crypt.php#114060
I've removed the original author's comments to give you a quick glance at the code. Visit the link for detailed explanations of each ...