nsILoginManagerCrypto

Methods

encrypt(plainText)

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.

Parameters

plainText The string to be encrypted.

decrypt(cipherText)

decrypt

Decrypts the specified string, returning the plaintext value.

Can throw if the user cancels entry of their master password, or if the
cipherText value can not be successfully decrypted (eg, if it was
encrypted with some other key).

Parameters

cipherText The string to be decrypted.

Attributes

uiBusy

uiBusy

True when a master password prompt is being displayed.

isLoggedIn

isLoggedIn

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.

defaultEncType

defaultEncType

Default encryption type used by an implementation of this interface.

Constants

ENCTYPE_BASE64

ENCTYPE_SDR