Get the hash of a string of text.
Get the hash of a string of text.
Get the hash of a sequence of bytes.
Get the hash of a sequence of bytes.
it is not safe to utilize the hash of a collection without a defined sequence. Hashing something like a set or multiset requires algorithmic choices to produce a determinstic sequence of bytes.
Get the hash of a java.nio.ByteBuffer.
Get the hash of a java.nio.ByteBuffer.
This is, in some situations, slower than finding the hash of an array. If you have both versions of the data available, the byte array should be preferred. However, it is probably not advisable to do your own conversion to a byte array.
Get the hash of an array of bytes.
Get the hash of an array of bytes.
The SHA-1 hash algorithm.
SHA-1 has been broken and should not be used unless it is required for backwards compatibility. Use one of the SHA-2 algorithms, or SHA-3.