:type fp: file
        :param fp: File pointer to the file to MD5 hash.  The file pointer
                   will be reset to the same position before the
                   method returns.

        :type size: int
        :param size: (optional) The Maximum number of bytes to read from
                     the file pointer (fp). This is useful when uploading
                     a file in multiple parts where the file is being
                     split inplace into different parts. Less bytes may
                     be available.

        :rtype: tuple
        :return: A tuple containing the hex digest version of the MD5 hash
                 as the first element and the base64 encoded version of the
                 plain digest as the second element.

def compute_md5(self, fp, size=None):
        """
        :type fp: file
        :param fp: File pointer to the file to MD5 hash.  The file pointer
                   will be reset to the same position before the
                   method returns.

        :type size: int
        :param size: (optional) The Maximum number of bytes to read from
                     the file pointer (fp). This is useful when uploading
                     a file in multiple parts where the file is being
                     split inplace into different parts. Less bytes may
                     be available.

        :rtype: tuple
        :return: A tuple containing the hex digest version of the MD5 hash
                 as the first element and the base64 encoded version of the
                 plain digest as the second element.
        """
        tup = compute_md5(fp, size=size)
        # Returned values are MD5 hash, base64 encoded MD5 hash, and data size.
        # The internal implementation of compute_md5() needs to return the 
        # data size but we don't want to return that value to the external
        # caller because it changes the class interface (i.e. it might        
        # break some code) so we consume the third tuple value here and 
        # return the remainder of the tuple to the caller, thereby preserving 
        # the existing interface.
        self.size = tup[2]
        return tup[0:2]