@@ -115,6 +115,7 @@ export interface ProvideCryptoSetupExtensions {
115115 createSecretStorageKey ( ) : Uint8Array | null ;
116116 catchAccessSecretStorageError ( e : Error ) : void ;
117117 setupEncryptionNeeded : ( args : CryptoSetupArgs ) => boolean ;
118+ /** @deprecated This callback is no longer used by matrix-react-sdk */
118119 getDehydrationKeyCallback ( ) :
119120 | ( ( keyInfo : SecretStorageKeyDescription , checkFunc : ( key : Uint8Array ) => void ) => Promise < Uint8Array > )
120121 | null ;
@@ -128,9 +129,14 @@ export abstract class CryptoSetupExtensionsBase implements ProvideCryptoSetupExt
128129 public abstract createSecretStorageKey ( ) : Uint8Array | null ;
129130 public abstract catchAccessSecretStorageError ( e : Error ) : void ;
130131 public abstract setupEncryptionNeeded ( args : CryptoSetupArgs ) : boolean ;
131- public abstract getDehydrationKeyCallback ( ) :
132+
133+ /** `getDehydrationKeyCallback` is no longer used; we provide an empty impl for type compatibility. */
134+ public getDehydrationKeyCallback ( ) :
132135 | ( ( keyInfo : SecretStorageKeyDescription , checkFunc : ( key : Uint8Array ) => void ) => Promise < Uint8Array > )
133- | null ;
136+ | null {
137+ return null ;
138+ }
139+
134140 public abstract SHOW_ENCRYPTION_SETUP_UI : boolean ;
135141}
136142
@@ -143,9 +149,8 @@ export interface CryptoSetupArgs {
143149/**
144150 *
145151 * The default/empty crypto-extensions
146- * Can (and will) be used if none of the modules has an implementaion of IProvideCryptoSetupExtensions
147- *
148- * */
152+ * Can (and will) be used if none of the modules has an implementation of {@link ProvideCryptoSetupExtensions}.
153+ */
149154export class DefaultCryptoSetupExtensions extends CryptoSetupExtensionsBase {
150155 public SHOW_ENCRYPTION_SETUP_UI = true ;
151156
@@ -178,7 +183,6 @@ export class DefaultCryptoSetupExtensions extends CryptoSetupExtensionsBase {
178183 public getDehydrationKeyCallback ( ) :
179184 | ( ( keyInfo : SecretStorageKeyDescription , checkFunc : ( key : Uint8Array ) => void ) => Promise < Uint8Array > )
180185 | null {
181- console . log ( "Default empty getDehydrationKeyCallback() => null" ) ;
182186 return null ;
183187 }
184188}
0 commit comments