Secure hash functions

A secure hash function will generate a large number, called the hash value, when given a document of some sort. This document can be of almost any type. We will be using simple strings in our examples.

The function is a one-way hash function, which means that it is effectively impossible to recreate the document when given a hash value. When used in conjunction with asymmetric keys, it allows the transmission of a document with the guarantee that the document has not been altered.

The sender of a document will use a secure hash function to generate the hash value for a document. The sender will encrypt this hash value with their private key. The document and the key are then combined and sent to a receiver. The document is ...

Get Learning Network Programming with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.