SSSS class

Constructors

SSSS(Encryption encryption)

Properties

client → Client
no setter
defaultKeyId → String?
no setter
encryption → Encryption
final
hashCode → int
The hash code for this object.
no setterinherited
onSecretStored → CachedStreamController<String>
Will be called when a new secret has been stored in the database
final
pendingShareRequests → Map<String, _ShareRequest>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

analyzeEncryptedSecrets() → Map<String, Set<String>>
Returns secret event types mapped to valid SSSS key ids.
checkKey(Uint8List key, SecretStorageKeyContent info) → Future<bool>
clearCache() → Future<void>
createKey([String? passphrase, String? name]) → Future<OpenSSSS>
Creates a new secret storage key, optional encrypts it with passphrase and stores it in the user's accountData.
getCached(String type) → Future<String?>
getKey(String keyId) → SecretStorageKeyContent?
getStored(String type, String keyId, Uint8List key) → Future<String>
handleToDeviceEvent(ToDeviceEvent event) → Future<void>
hasInvalidEncryptedEntries(String type) → bool
Returns whether type has malformed encrypted entries, or entries encrypted with invalid key ids.
isKeyValid(String keyId) → bool
isSecret(String type) → bool
keyIdForNamedSecretStorageKey(String name) → String?
Resolves the key id for a secret-storage key definition by its name field on m.secret_storage.key.<key_id> account data.
keyIdFromType(String type) → String?
keyIdsFromType(String type) → Set<String>?
maybeCacheAll(String keyId, Uint8List key) → Future<void>
maybeRequestAll([List<DeviceKeys>? devices]) → Future<void>
migrateSecretsToKey({required OpenSSSS primaryUnlockedKey, required OpenSSSS destinationKey, String? unlockCredential, Map<String, OpenSSSS>? candidateOldKeys, bool stripKeys = false, bool stripAsDefaultKey = true}) → Future<Set<String>>
Migrates available secrets from old keys to destinationKey.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open([String? identifier]) → OpenSSSS
orderedCandidateKeyIds(Map<String, Set<String>> secretsByType, String preferredKeyId) → List<String>
Ordered key ids to try for migration: preferred key first, then all other candidates once.
periodicallyRequestMissingCache() → Future<void>
removeUnusedNamedSecretStorageKeys(String name) → Future<void>
request(String type, [List<DeviceKeys>? devices]) → Future<void>
setCacheCallback(String type, FutureOr<void> callback(String)) → void
setDefaultKeyId(String keyId) → Future<void>
setValidator(String type, FutureOr<bool> validator(String)) → void
store(String type, String secret, String keyId, Uint8List key, {bool add = false}) → Future<void>
stripKeyPreservingDefault(String keyId, String name) → Future<void>
Drops keyId from the encrypted map of every secret that already includes the default key, then deletes unused named keys with name.
toString() → String
A string representation of this object.
inherited
validateAndStripOtherKeys(String type, String secret, String keyId, Uint8List key, {bool isDefaultKey = true}) → Future<void>

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

decodeRecoveryKey(String recoveryKey) → Uint8List
decryptAes(EncryptedContent data, Uint8List key, String name) → Future<String>
deriveKeys(Uint8List key, String name) → DerivedKeys
encodeRecoveryKey(Uint8List recoveryKey) → String
encryptAes(String data, Uint8List key, String name, [String? ivStr]) → Future<EncryptedContent>
keyFromPassphrase(String passphrase, PassphraseInfo info) → Future<Uint8List>
looksLikeRecoveryKey(String input) → bool
Whether input looks like an Olm/SSSS recovery key (not a passphrase).