There is a lot of code in HTTP and SASL Digest mechanism which do the same thing and should be moved into DigestUtil because of it.