Interface nsISecretDecoderRingType

Hierarchy

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

  • Run decryptString on multiple strings, asynchronously. This will allow you to not jank the browser if you need to decrypt a large number of strings all at once.

    Returns

    A promise that resolves with the list of decrypted strings in Unicode.

    Parameters

    • encryptedStrings: invalid

      the strings to decrypt, encoded as Base64.

    Returns any

  • Run encryptString on multiple strings, asynchronously. This will allow you to not jank the browser if you need to encrypt a large number of strings all at once. This method accepts an array of wstrings which it will convert to UTF-8 internally before encrypting.

    Returns

    A promise for the list of encrypted strings, encoded as Base64.

    Parameters

    • plaintexts: invalid

      the strings to encrypt.

    Returns any

  • Prompt the user to change the password on the SDR key.

    Returns void

  • Decrypt Base64 input. See the encryptString() documentation - this method has basically the same limitations.

    Returns

    The decoded text.

    Parameters

    • encryptedBase64Text: string

      Encrypted input text, encoded as Base64.

    Returns string

  • Encrypt to Base64 output. Note that the input must basically be a byte array (i.e. the code points must be within the range [0, 255]). Hence, using this method directly to encrypt passwords (or any text, really) won't work as expected. Instead, use something like nsIScriptableUnicodeConverter to first convert the desired password or text to UTF-8, then encrypt that. Remember to convert back when calling decryptString().

    Returns

    The encrypted text, encoded as Base64.

    Parameters

    • text: string

      The text to encrypt.

    Returns string

  • Logout of the security device that protects the SDR key.

    Returns void

  • Logout of the security device that protects the SDR key and tear down authenticated objects.

    Returns void

Generated using TypeDoc