def create_from_file(file_path, algo=None): """ Creates a MD5 Checksum from an whole File :param file_path: Input File to calc MD5 checksum for :return: MD5 Checksum :author: Robert Hecker """ return checksum(file_path, algo=hlmd5() if algo is None else algo)
def create_from_string(str_val, algo=None): """ Creates a MD5 Checksum from a given string :param str_val: Input string to calc MD5 checksum for :type str_val: string :return: MD5 Checksum :author: Robert Hecker """ return checksum(str_val, algo=hlmd5() if algo is None else algo, strings=True)
def CreateFromFolder(folder_path, ignorelist=None): # pylint: disable=C0103 """ :deprecated: use `create_from_folder` instead """ return checksum(folder_path, algo=hlmd5(), ignore=ignorelist)
def CreateFromFile(file_path, algo=None): # pylint: disable=C0103 """ :deprecated: use `create_from_file` instead """ return checksum(file_path, algo=hlmd5() if algo is None else algo)
def CreateFromString(str_val, md5=None): # pylint: disable=C0103 """ :deprecated: use `create_from_string` instead """ return checksum(str_val, algo=hlmd5() if md5 is None else md5, strings=True)