Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
def CreateFromFolder(folder_path, ignorelist=None):  # pylint: disable=C0103
    """
    :deprecated: use `create_from_folder` instead
    """
    return checksum(folder_path, algo=hlmd5(), ignore=ignorelist)
Beispiel #4
0
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)
Beispiel #5
0
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)