(self, algorithm, filename)
return ""
hash calculation using openssl
hash calculation using openssl
hash calculation using openssl
def _openssl(self, algorithm, filename):
        """hash calculation using openssl"""
        cmd = ["openssl", "dgst", "-hex", "-r", algorithm, filename]
        output = Uprocess().get_output(cmd)
        if output is None:
            return ""
        match = re.match("^(\\S+) ", output)
        if match:
            return match.group(1)
        return ""
def _openssl ( self , algorithm , filename ) : cmd = [ "openssl" , "dgst" , "-hex" , "-r" , algorithm , filename ] output = Uprocess ( ) . get_output ( cmd ) if output is None : return "" match = re . match ( "^(\\S+) " , output ) if match : return match . group ( 1 ) return ""