def oracle_passwd(password, salt, uppercase=True):
 binsalt = hexdecode(salt)
 retVal = ('s:%s%s' % (sha1((utf8encode(password) + binsalt)).hexdigest(), salt))
 return (retVal.upper() if uppercase else retVal.lower())

def oracle_passwd ( password , salt , uppercase = True ) : binsalt = hexdecode ( salt ) retVal = ( 's:%s%s' % ( sha1 ( ( utf8encode ( password ) + binsalt ) ) . hexdigest ( ) , salt ) ) return ( retVal . upper ( ) if uppercase else retVal . lower ( ) )
reference(s): URL URL URL .