def odnoklassniki_iframe_sig(data, client_secret_or_session_secret):
 param_list = sorted(['{0:s}={1:s}'.format(key, value) for (key, value) in data.items()])
 return md5((''.join(param_list) + client_secret_or_session_secret).encode('utf-8')).hexdigest()

def odnoklassniki_iframe_sig ( data , client_secret_or_session_secret ) : param_list = sorted ( [ '{0:s}={1:s}' . format ( key , value ) for ( key , value ) in data . items ( ) ] ) return md5 ( ( '' . join ( param_list ) + client_secret_or_session_secret ) . encode ( 'utf-8' ) ) . hexdigest ( )
calculates signature as described at: URL authentication+and+authorization if api method requires session context .