def _create_cookie_data(email, admin):
 if email:
  user_id_digest = hashlib.md5(email.lower()).digest()
  user_id = ('1' + ''.join([('%02d' % ord(x)) for x in user_id_digest])[:20])
 else:
  user_id = ''
 return ('%s:%s:%s' % (email, admin, user_id))

def _create_cookie_data ( email , admin ) : if email : user_id_digest = hashlib . md5 ( email . lower ( ) ) . digest ( ) user_id = ( '1' + '' . join ( [ ( '%02d' % ord ( x ) ) for x in user_id_digest ] ) [ : 20 ] ) else : user_id = '' return ( '%s:%s:%s' % ( email , admin , user_id ) )
creates cookie payload data .