libfidl.py
def hash(string, hashtype):
   """
    This function returns a defined hash for a string 
    
    :param string: a string to hash
    :type filename: string
    :param hashtype: The hashing function which should be used. It has to be defined in hashlib
    :type hashtype: String
    :return type: String representation of a hex number
   """
   # hash binary representation of string and convert it to hex
   return eval('hashlib.{}(string.encode())'.format(hashtype)).hexdigest()

    This function returns a defined hash for a string 
    
    :param string: a string to hash
    :type filename: string
    :param hashtype: The hashing function which should be used. It has to be defined in hashlib
    :type hashtype: String
    :return type: String representation of a hex number
   
This function returns a defined hash for a string
This function returns a defined hash for a string
def hash(string, hashtype):
   return eval('hashlib.{}(string.encode())'.format(hashtype)).hexdigest()
def hash ( string , hashtype ) : return eval ( 'hashlib.{}(string.encode())' . format ( hashtype ) ) . hexdigest ( )
This function returns a defined hash for a string
This function returns a defined hash for a string
"""
    This function returns a defined hash for a string 
    
    :param string: a string to hash
    :type filename: string
    :param hashtype: The hashing function which should be used. It has to be defined in hashlib
    :type hashtype: String
    :return type: String representation of a hex number
   """ # hash binary representation of string and convert it to hex
String representation of a hex number
String representation of a hex number
type
string
a string to hash
a string to hash
hashtype
The hashing function which should be used. It has to be defined in hashlib
The hashing function which should be used . It has to be defined in hashlib