You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-07 05:22:15 +03:00
Fix type docs for checkPrivateKey
This commit is contained in:
@@ -1027,14 +1027,15 @@ function wrapCryptoFuncs(MatrixClient, names) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that a given private key matches a given public key
|
* Checks that a given private key matches a given public key.
|
||||||
* This can be used by the getCrossSigningKey callback to verify that the
|
* This can be used by the getCrossSigningKey or getSecretStorageKey callbacks
|
||||||
* private key it is about to supply is the one that was requested.
|
* to verify that the private key it is about to supply is the one that was
|
||||||
|
* requested.
|
||||||
* The cross-signing API is currently UNSTABLE and may change without notice.
|
* The cross-signing API is currently UNSTABLE and may change without notice.
|
||||||
*
|
*
|
||||||
* @function module:client~MatrixClient#checkPrivateKey
|
* @function module:client~MatrixClient#checkPrivateKey
|
||||||
* @param {Uint8Array} privateKey The private key
|
* @param {Uint8Array} privateKey The private key
|
||||||
* @param {Uint8Array} expectedPublicKey The public key supplied by the getCrossSigningKey callback
|
* @param {string} expectedPublicKey The public key
|
||||||
* @returns {boolean} true if the key matches, otherwise false
|
* @returns {boolean} true if the key matches, otherwise false
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export class CrossSigningInfo extends EventEmitter {
|
|||||||
/**
|
/**
|
||||||
* Calls the app callback to ask for a private key
|
* Calls the app callback to ask for a private key
|
||||||
* @param {string} type The key type ("master", "self_signing", or "user_signing")
|
* @param {string} type The key type ("master", "self_signing", or "user_signing")
|
||||||
* @param {Uint8Array} expectedPubkey The matching public key or undefined to use
|
* @param {string} expectedPubkey The matching public key or undefined to use
|
||||||
* the stored public key for the given key type.
|
* the stored public key for the given key type.
|
||||||
* @returns {Array} An array with [ public key, Olm.PkSigning ]
|
* @returns {Array} An array with [ public key, Olm.PkSigning ]
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -467,12 +467,13 @@ Crypto.prototype.setDefaultSecretStorageKeyId = function(k) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that a given private key matches a given public key
|
* Checks that a given private key matches a given public key.
|
||||||
* This can be used by the getCrossSigningKey callback to verify that the
|
* This can be used by the getCrossSigningKey or getSecretStorageKey callbacks
|
||||||
* private key it is about to supply is the one that was requested.
|
* to verify that the private key it is about to supply is the one that was
|
||||||
|
* requested.
|
||||||
*
|
*
|
||||||
* @param {Uint8Array} privateKey The private key
|
* @param {Uint8Array} privateKey The private key
|
||||||
* @param {Uint8Array} expectedPublicKey The public key supplied by the getCrossSigningKey callback
|
* @param {string} expectedPublicKey The public key
|
||||||
* @returns {boolean} true if the key matches, otherwise false
|
* @returns {boolean} true if the key matches, otherwise false
|
||||||
*/
|
*/
|
||||||
Crypto.prototype.checkPrivateKey = function(privateKey, expectedPublicKey) {
|
Crypto.prototype.checkPrivateKey = function(privateKey, expectedPublicKey) {
|
||||||
|
|||||||
Reference in New Issue
Block a user