Support digest algorithms with a ReadableByteChannel.
Added unit test cases.