Creates digest of data, returning it as a list where every element is a
        single byte of digest (an integer between 0 and 255).

        No digest will be calculated on the data if the passed data is already a
        valid hex string representation of digest, and the passed value will be
        used as digest in hex string format instead.

        Arguments:

          data - Raw data or hex string representation of existing digest for
          which a list of one-byte digest values should be returned.

        Returns:

          List of integers where each element is between 0 and 255, and
          repesents a single byte of a data digest.

def _data_to_digest_byte_list(self, data):
        """
        Creates digest of data, returning it as a list where every element is a
        single byte of digest (an integer between 0 and 255).

        No digest will be calculated on the data if the passed data is already a
        valid hex string representation of digest, and the passed value will be
        used as digest in hex string format instead.

        Arguments:

          data - Raw data or hex string representation of existing digest for
          which a list of one-byte digest values should be returned.

        Returns:

          List of integers where each element is between 0 and 255, and
          repesents a single byte of a data digest.
        """

        # If data seems to provide identical amount of entropy as digest, it
        # could be a hex digest already.
        if len(data) // 2 == self.digest_entropy // 8:
            try:
                binascii.unhexlify(data.encode('utf-8'))
                digest = data.encode('utf-8')
            # Handle Python 2.x exception.
            except (TypeError):
                digest = self.digest(data.encode('utf-8')).hexdigest()
            # Handle Python 3.x exception.
            except (binascii.Error):
                digest = self.digest(data.encode('utf-8')).hexdigest()
        else:
            digest = self.digest(data.encode('utf-8')).hexdigest()

        return [int(digest[i * 2:i * 2 + 2], 16) for i in range(16)]