def decodeWithHash(text):
    """
    Function to decode a text and calculate the MD5 hash.
    
    @param text text to decode (string)
    @return decoded text, encoding and MD5 hash
    """
    hash = str(QCryptographicHash.hash(QByteArray(text), QCryptographicHash.Md5).toHex())
    return decode(text) + (hash, )
Ejemplo n.º 2
0
def decodeWithHash(text):
    """
    Function to decode a text and calculate the MD5 hash.
    
    @param text text to decode (string)
    @return decoded text, encoding and MD5 hash
    """
    hash = str(QCryptographicHash.hash(QByteArray(text), QCryptographicHash.Md5).toHex())
    return decode(text) + (hash, )
Ejemplo n.º 3
0
 def generateView( self, sqlQuery ):
     name = 'TMP_' + QCryptographicHash.hash(sqlQuery.toUtf8(), QCryptographicHash.Md5).toHex()
     strQuery = QString('CREATE OR REPLACE VIEW '  + self.schemaName + '.' + name + ' AS ' + sqlQuery)
     self.execSql(strQuery)			
     return name