MCPcopy Create free account
hub / github.com/ActiveState/code / decode

Method decode

recipes/Python/578076_Markov/recipe-578076.py:233–243  ·  view source on GitHub ↗

Decode encrypted message and display plain-text in output.

(self, string)

Source from the content-addressed store, hash-verified

231 # Decrypt a string for display in the interface's output area.
232
233 def decode(self, string):
234 "Decode encrypted message and display plain-text in output."
235 try:
236 cipher = self.extract_keys(string)
237 text = self.extract_text(cipher)
238 except ValueError:
239 self.output = ''
240 except:
241 self.output = traceback.format_exc()
242 else:
243 self.output = text
244
245 def extract_keys(self, string):
246 "Extract keys to decryption and return the cipher-text area."

Callers 15

refreshMethod · 0.95
_parseStringFunction · 0.45
Find_ChunksMethod · 0.45
readlineMethod · 0.45
searchMethod · 0.45
decodeFunction · 0.45
mainFunction · 0.45
encrypt_strFunction · 0.45
decrypt_strFunction · 0.45
autoreadMethod · 0.45
import_Method · 0.45

Calls 2

extract_keysMethod · 0.95
extract_textMethod · 0.95

Tested by

no test coverage detected