Gnumed.wxpython.gmCryptoText.gmCryptoText

Package Gnumed :: Package wxpython :: Module gmCryptoText :: Class gmCryptoText |
[frames] | no frames]

# Class gmCryptoText

source code

    wx.TextCtrl --+
                  |
                 gmCryptoText

A special text widget that supports cryptography

A right mouse click pops up a manu that allows to encrypt or decrypt selected text segments. You can drag and drop any number of text files into the text widget, and that text will be inserted at the current cursor position

Instance Methods
__init__(self, parent, id, size=wx.DefaultSize, style=wx.TE_MULTILINE | wx.TE_RICH, defaulttext=None) | source code
OnRightClick(self, event) A right mouse click triggers a popup menu for cryptographic functionality | source code
OnEncrypt(self, event) triggered by popup contect menu event | source code
OnDecrypt(self, event) | source code
OnSetPassphrase(self, event) | source code
OnRightDown(self, event) dummy function; if this event was not intercepted, GTK would clear the text selection the very moment the mouse button is clicked | source code
AskForPassphrase(self) asks for a pass phrase and returns it | source code
Encrypt(self, cleartext, key) override this function for your own crypto funcs | source code
Decrypt(self, ciphertext, key, identtag) override this function for your own crypto funcs | source code
StripIdentTag(self, text) Remove the 'ident tag' from text and return both tag and test | source code
GetIdentTag(self) This is a 'virtual' function which should be overridden to provide your own meaningful tag | source code
SetFuzzyMargin(self, margin) The fuzzy margin is the number of characters on each side of the text selection the decryption algorithm will search for correct delimiters. | source code
FuzzyScanSelection(self, frompos, topos, margin) | source code

Method Details

### SetFuzzyMargin(self, margin) | source code
The fuzzy margin is the number of characters on each side of the text selection the decryption algorithm will search for correct delimiters. It should be at least as long as the IdentTag is plus an extra 3 characters to allow for the crypto tag