• Mark Fasheh's avatar
    Add option to choose hash type used. · 4f905264
    Mark Fasheh authored
    This adds an option to duperemove (and csum-test), '--hash=' which allows
    the user to pick which algorithm is used for hashing blocks.
    Internally we make a hash_module structure which holds function pointers to
    the various hashing operations as well pointers to friendly and internal
    names. The init_hash() function is changed to take a string and will choose
    the module structure whose hash name matches that string.
    Aside from defining a module structure, the changes to each hash module c
    file are minimal - renaming functions and variables so we don't clash.
    Signed-off-by: 's avatarMark Fasheh <mfasheh@suse.de>