def decrypt_string(s, key=''):
 key += ' '
 s = base64.urlsafe_b64decode(s)
 a = []
 for i in xrange(len(s)):
  try:
   a.append(chr((ord(s[i]) - (ord(key[(i % len(key))]) % 256))))
  except:
   raise DecryptionError()
 s = ''.join(a)
 s = decode_utf8(s)
 return s

def decrypt_string ( s , key = '' ) : key += ' ' s = base64 . urlsafe_b64decode ( s ) a = [ ] for i in xrange ( len ( s ) ) : try : a . append ( chr ( ( ord ( s [ i ] ) - ( ord ( key [ ( i % len ( key ) ) ] ) % 256 ) ) ) ) except : raise DecryptionError ( ) s = '' . join ( a ) s = decode_utf8 ( s ) return s
returns the given string as a decrypted unicode string .