Interface nsILoginManagerCryptoType

Hierarchy

Properties

defaultEncType: number

defaultEncType

Default encryption type used by an implementation of this interface.

isLoggedIn: boolean

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 primary password prompt.

uiBusy: boolean

uiBusy

True when a primary password prompt is being displayed.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • decrypt

    Parameters

    • cipherText: string

      The string to be decrypted.

      Decrypts the specified string, returning the plaintext value.

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

    Returns string

  • Parameters

    • cipherTexts: any

      The strings to be decrypted.

      Decrypts the specified strings, returning the plaintext values.

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

    Returns any

  • encrypt

    Parameters

    • plainText: string

      The string to be encrypted.

      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 primary password.

    Returns string

  • encryptMany

    Parameters

    • plainTexts: any

      The strings to be encrypted.

      Encrypts the specified strings, similar to encrypt, but returning a promise which resolves with the the encrypted strings.

    Returns any

Generated using TypeDoc