Fix MessageDigest.update(ByteBuffer) and .digest(byte[],...).

This makes MessageDigest delegate update(ByteBuffer) and
digest(byte[], int, int) to the corresponding methods of its
MessageDigestSpi implementation. Without the delegation, the
potentially more efficient implementations of engineUpdate(ByteBuffer)
and engineDigest(byte[], int, int) in the SPI implementations were
ignored.

The test added here was inspired by a similar test for Signature
method delegation: b131e0c6c504ea2d1527f7843d63501139f696a0.

Bug: 24668220
Change-Id: I563e44c225efc05097fb4df6b9d3869fcee807f0
2 files changed