Please add a summary to this article.
1.0
28
Introduced
Gecko 2.0
Inherits from:
nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)Method overview
AString decrypt(in AString cipherText); |
AString encrypt(in AString plainText); |
Attributes
Attribute | Type | Description |
isLoggedIn | boolean | Current login state of the token used for encryption. If the user is not logged in, performing a crypto operation will result in a master password prompt. Read only. |
uiBusy | boolean | true when a master password prompt is being displayed. Read only. |
Methods
decrypt()
Decrypts the specified string, returning the plain text value.
Can throw if the user cancels entry of their master password, or if the cipherText
value can not be successfully decrypted (for example, if it was encrypted with some other key).
AString decrypt( in AString cipherText );
Parameters
cipherText
- The string to be decrypted.
Return value
The decrypted string.
encrypt()
Encrypts the specified string, returning the ciphertext value.
Note: The current implemention of this inferface simply uses NSS/PSM's "Secret Decoder Ring" service. It is not recommended for general purpose encryption/decryption.
Can throw if the user cancels entry of their master password.
AString encrypt( in AString plainText );
Parameters
plainText
- The string to be encrypted.
Return value
The encrypted string.