summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/nsISecretDecoderRing.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /security/manager/ssl/nsISecretDecoderRing.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'security/manager/ssl/nsISecretDecoderRing.idl')
-rw-r--r--security/manager/ssl/nsISecretDecoderRing.idl49
1 files changed, 49 insertions, 0 deletions
diff --git a/security/manager/ssl/nsISecretDecoderRing.idl b/security/manager/ssl/nsISecretDecoderRing.idl
new file mode 100644
index 000000000..e9f67cbee
--- /dev/null
+++ b/security/manager/ssl/nsISecretDecoderRing.idl
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+[scriptable, uuid(0EC80360-075C-11d4-9FD4-00C04F1B83D8)]
+interface nsISecretDecoderRing: nsISupports {
+ /**
+ * 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().
+ *
+ * @param text The text to encrypt.
+ * @return The encrypted text, encoded as Base64.
+ */
+ ACString encryptString(in ACString text);
+
+ /**
+ * Decrypt Base64 input.
+ * See the encryptString() documentation - this method has basically the same
+ * limitations.
+ *
+ * @param encryptedBase64Text Encrypted input text, encoded as Base64.
+ * @return The decoded text.
+ */
+ ACString decryptString(in ACString encryptedBase64Text);
+
+ /**
+ * Prompt the user to change the password on the SDR key.
+ */
+ void changePassword();
+
+ /**
+ * Logout of the security device that protects the SDR key.
+ */
+ void logout();
+
+ /**
+ * Logout of the security device that protects the SDR key and tear
+ * down authenticated objects.
+ */
+ void logoutAndTeardown();
+};