showtext.js

Summary
showtext.js
Functions
onLoadThis function is called when the showtext.xul form is show.
openfOpen a file a display it into the editor.
savefSave the current data in the editor to a file
cryptEncrypt the current data of the editor.
symcryptSymetricaly encrypt the current data of the editor.
cryptandsignEncrypt and sign the current data of the editor.
dcryptDecrypt the current data of the editor.
signSign the current data of the editor.
signUnClearSign the current data of the editor (unclear)
verifyVerfiy signs of the current data of the editor.
getSelectedTextReturn the current selected text of the editor.
setSeletedTextRemplace the current selected text of the editor with the text in parameter.

Functions

onLoad

function onLoad(win)

This function is called when the showtext.xul form is show.  It’s init the differents objets (like the translated strings).

Parameters

winThe form herself.
windows.arguments[0].titleThe title of the window.
windows.arguments[0].textThe text to put in the editor.
windows.arguments[0].descriptionThe description to show.
windows.arguments[0].doShowButtonsOptional.  Set this to true to disable buttons (encrypt, ...)
windows.arguments[0].validSignOptional.  The text to display in the validSign label.

openf

function openf()

Open a file a display it into the editor.

savef

function savef()

Save the current data in the editor to a file

crypt

function crypt()

Encrypt the current data of the editor.

symcrypt

function symcrypt()

Symetricaly encrypt the current data of the editor.

cryptandsign

function cryptandsign()

Encrypt and sign the current data of the editor.

dcrypt

function dcrypt()

Decrypt the current data of the editor.

sign

function sign()

Sign the current data of the editor.

signUnClear

function signUnClear()

Sign the current data of the editor (unclear)

verify

function verify()

Verfiy signs of the current data of the editor.

getSelectedText

function getSelectedText()

Return the current selected text of the editor.  If nothing is selected, all text is returned.

setSeletedText

function setSeletedText(text)

Remplace the current selected text of the editor with the text in parameter.  If nothing is selected, all text is remplaced.

Parameters

textThe new text.
function onLoad(win)
This function is called when the showtext.xul form is show.
function openf()
Open a file a display it into the editor.
function savef()
Save the current data in the editor to a file
function crypt()
Encrypt the current data of the editor.
function symcrypt()
Symetricaly encrypt the current data of the editor.
function cryptandsign()
Encrypt and sign the current data of the editor.
function dcrypt()
Decrypt the current data of the editor.
function sign()
Sign the current data of the editor.
function signUnClear()
Sign the current data of the editor (unclear)
function verify()
Verfiy signs of the current data of the editor.
function getSelectedText()
Return the current selected text of the editor.
function setSeletedText(text)
Remplace the current selected text of the editor with the text in parameter.
Close