mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Rename "SharedSecret" -> "SecretSharing"
This commit is contained in:
parent
631b2f059f
commit
8b36392b90
@ -45,7 +45,7 @@ import {
|
||||
removeKey as ssssRemoveKey,
|
||||
keyFromDehydratedDeviceKey as createSSSSKeyFromDehydratedDeviceKey,
|
||||
SecretStorage,
|
||||
SharedSecret,
|
||||
SecretSharing,
|
||||
SecretFetcher
|
||||
} from "./ssss/index";
|
||||
import {ObservableValue, RetainedObservableValue} from "../observable/value";
|
||||
@ -201,7 +201,7 @@ export class Session {
|
||||
});
|
||||
this._megolmDecryption = new MegOlmDecryption(this._keyLoader, this._olmWorker);
|
||||
this._deviceMessageHandler.enableEncryption({olmDecryption, megolmDecryption: this._megolmDecryption});
|
||||
this._sharedSecret = new SharedSecret({
|
||||
this._secretSharing = new SecretSharing({
|
||||
hsApi: this._hsApi,
|
||||
storage: this._storage,
|
||||
deviceMessageHandler: this._deviceMessageHandler,
|
||||
@ -213,7 +213,7 @@ export class Session {
|
||||
crossSigning: this._crossSigning,
|
||||
logger: this._platform.logger,
|
||||
});
|
||||
this.secretFetcher.setSecretSharing(this._sharedSecret);
|
||||
this.secretFetcher.setSecretSharing(this._secretSharing);
|
||||
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import type {SecretStorage} from "./SecretStorage";
|
||||
import type {SharedSecret} from "./SharedSecret";
|
||||
import type {SecretSharing} from "./SecretSharing";
|
||||
|
||||
/**
|
||||
* This is a wrapper around SecretStorage and SecretSharing so that
|
||||
@ -23,7 +23,7 @@ import type {SharedSecret} from "./SharedSecret";
|
||||
*/
|
||||
export class SecretFetcher {
|
||||
public secretStorage: SecretStorage;
|
||||
public secretSharing: SharedSecret;
|
||||
public secretSharing: SecretSharing;
|
||||
|
||||
async getSecret(name: string): Promise<string | undefined> {
|
||||
;
|
||||
@ -39,7 +39,7 @@ export class SecretFetcher {
|
||||
this.secretStorage = storage;
|
||||
}
|
||||
|
||||
setSecretSharing(sharing: SharedSecret) {
|
||||
setSecretSharing(sharing: SecretSharing) {
|
||||
this.secretSharing = sharing;
|
||||
this.secretSharing.setSecretFetcher(this);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ const enum EVENT_TYPE {
|
||||
SEND = "m.secret.send",
|
||||
}
|
||||
|
||||
export class SharedSecret {
|
||||
export class SecretSharing {
|
||||
private readonly hsApi: HomeServerApi;
|
||||
private readonly storage: Storage;
|
||||
private readonly deviceMessageHandler: DeviceMessageHandler;
|
@ -26,7 +26,7 @@ import type * as OlmNamespace from "@matrix-org/olm"
|
||||
|
||||
// Add exports for other classes
|
||||
export {SecretFetcher} from "./SecretFetcher";
|
||||
export {SharedSecret} from "./SharedSecret";
|
||||
export {SecretSharing} from "./SecretSharing";
|
||||
export {SecretStorage} from "./SecretStorage";
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user