summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-04-24 14:03:36 +0200
committerRaindropsSys <contact@minteck.org>2023-04-24 14:03:36 +0200
commit633c92eae865e957121e08de634aeee11a8b3992 (patch)
tree09d881bee1dae0b6eee49db1dfaf0f500240606c /includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts
parentc4657e4509733699c0f26a3c900bab47e915d5a0 (diff)
downloadpluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.gz
pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.bz2
pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.zip
Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated)
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts')
-rw-r--r--includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts55
1 files changed, 55 insertions, 0 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts b/includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts
new file mode 100644
index 0000000..9f6af3e
--- /dev/null
+++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/secret-storage.d.ts
@@ -0,0 +1,55 @@
+/**
+ * Implementation of server-side secret storage
+ *
+ * @see https://spec.matrix.org/v1.6/client-server-api/#storage
+ */
+/**
+ * Common base interface for Secret Storage Keys.
+ *
+ * The common properties for all encryption keys used in server-side secret storage.
+ *
+ * @see https://spec.matrix.org/v1.6/client-server-api/#key-storage
+ */
+export interface SecretStorageKeyDescriptionCommon {
+ /** A human-readable name for this key. */
+ name: string;
+ /** The encryption algorithm used with this key. */
+ algorithm: string;
+ /** Information for deriving this key from a passphrase. */
+ passphrase: PassphraseInfo;
+}
+/**
+ * Properties for a SSSS key using the `m.secret_storage.v1.aes-hmac-sha2` algorithm.
+ *
+ * Corresponds to `AesHmacSha2KeyDescription` in the specification.
+ *
+ * @see https://spec.matrix.org/v1.6/client-server-api/#msecret_storagev1aes-hmac-sha2
+ */
+export interface SecretStorageKeyDescriptionAesV1 extends SecretStorageKeyDescriptionCommon {
+ /** The 16-byte AES initialization vector, encoded as base64. */
+ iv: string;
+ /** The MAC of the result of encrypting 32 bytes of 0, encoded as base64. */
+ mac: string;
+}
+/**
+ * Union type for secret storage keys.
+ *
+ * For now, this is only {@link SecretStorageKeyDescriptionAesV1}, but other interfaces may be added in future.
+ */
+export type SecretStorageKeyDescription = SecretStorageKeyDescriptionAesV1;
+/**
+ * Information on how to generate the key from a passphrase.
+ *
+ * @see https://spec.matrix.org/v1.6/client-server-api/#deriving-keys-from-passphrases
+ */
+export interface PassphraseInfo {
+ /** The algorithm to be used to derive the key. */
+ algorithm: "m.pbkdf2";
+ /** The number of PBKDF2 iterations to use. */
+ iterations: number;
+ /** The salt to be used for PBKDF2. */
+ salt: string;
+ /** The number of bits to generate. Defaults to 256. */
+ bits?: number;
+}
+//# sourceMappingURL=secret-storage.d.ts.map \ No newline at end of file