Completes the hash computation by performing final
operations such as padding. Once
engineDigest
has
been called, the engine should be reset (see
engineReset
).
Resetting is the responsibility of the
engine implementor.
This method should be abstract, but we leave it concrete for
binary compatibility. Knowledgeable providers should override this
method.
Returns:
the length of the digest stored in the output buffer.
Parameters:
-
buf - the output buffer in which to store the digest
-
offset - offset to start from in the output buffer
-
len - number of bytes within buf allotted for the digest.
Both this default implementation and the SUN provider do not
return partial digests. The presence of this parameter is solely
for consistency in our API's. If the value of this parameter is less
than the actual digest length, the method will throw a DigestException.
This parameter is ignored if its value is greater than or equal to
the actual digest length.
Throws:
-
DigestException - if an error occurs.
Since:
1.2