The MessageDigest class implements the SHA-1 algorithm (among many others). The SHA-1 algorithm allows one to use different "seeds" or initial digests. See SHA-1 Psuedocode
The algorithm initializes variables, or the seed:
Initialize variables:
h0 = 0x67452301
h1 = 0xEFCDAB89
h2 = 0x98BADCFE
h3 = 0x10325476
h4 = 0xC3D2E1F0
However the MessageDigest class, as described in the Online Java Manual, provides no API for setting these initial variables. In fact, it doesn't state the value of the initial variables.
How can I set the initial seed for the SHA-1 algorithm?
Where is an example of SHA-1 in Java, USING AN INITIAL SEED?
(I'm looking for the SHA-1 implementation, unless the example uses MessageDigest
with an alternative initial seed.)