public static MD5Digest fromBytes ( byte [ ] md5Bytes , int offset ) { byte [ ] md5BytesCopy = Arrays . copyOfRange ( md5Bytes , offset , offset + MD5_BYTES_LENGTH ) ; //TODO: Replace this with a version that encodes without needing a copy. String md5String = Hex . encodeHexString ( md5BytesCopy ) ; return new MD5Digest ( md5String , md5BytesCopy ) ; }
Static method to get an MD5Digest from a binary byte representation .