Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/Keychain/Sources/Keychain/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 2 kB image not shown  

Quelle  KeychainManagerProtocol.swift   Sprache: JAVA

 

import Foundation
import ThreemaEssentials

public protocol KeychainManagerProtocol: Sendable {
    static func loadRemoteSecret() throws -> (
        authenticationToken: Data,
        identityHash: Data
    )?
    static func storeRemoteSecret(authenticationToken: Data, identityHash: Data) throws
    static func deleteRemoteSecret() throws
    
    static func loadThreemaIdentity() throws -> ThreemaIdentity?
    
    func loadIdentity() throws -> MyIdentity?
    /// Stores the identity to the keychain
    /// - Parameters:
    ///   - myIdentity: Identity to store
    ///   - thisDeviceOnly: If true, the identity is stored with `kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly`
    func storeIdentity(_ myIdentity: MyIdentity, thisDeviceOnly: Bool) throws
    func deleteIdentity() throws
    func isIdentityThisDeviceOnly() throws -> Bool
    func changeIdentityAccessibility(thisDeviceOnly: Bool) throws

    static func loadIdentityBackup() throws -> String
    static func storeIdentityBackup(_ data: String) throws
    static func deleteIdentityBackup() throws

    func loadDeviceCookie() throws -> Data?
    func storeDeviceCookie(_ cookie: Data) throws
    static func deleteDeviceCookie() throws

    func loadMultiDeviceGroupKey() throws -> Data?
    func storeMultiDeviceGroupKey(key: Data) throws
    /// This function is static, since we must be able to delete the key in setup
    static func deleteMultiDeviceGroupKey() throws
    
    func loadMultiDeviceID() throws -> Data?
    func storeMultiDeviceID(id: Data) throws
    func deleteMultiDeviceID() throws

    func loadForwardSecurityWrappingKey() throws -> Data?
    func storeForwardSecurityWrappingKey(_ key: Data) throws
    static func deleteForwardSecurityKey() throws

    static func loadOnPremServer() throws -> String?
    static func loadUnencryptedLicense() throws -> ThreemaLicense?

    func loadLicense() throws -> ThreemaLicense?
    func storeLicense(_ license: ThreemaLicense) throws
    func deleteLicense() throws

    func loadThreemaSafeKey() throws -> Data?
    func storeThreemaSafeKey(key: Data) throws
    func deleteThreemaSafeKey() throws

    func loadThreemaSafeServer() throws -> ThreemaSafeServerInfo?
    func storeThreemaSafeServer(_ safeServer: ThreemaSafeServerInfo) throws
    func deleteThreemaSafeServer() throws

    func loadDataBackupRecoveryKey() throws -> Data?
    func storeDataBackupRecoveryKey(_ key: Data) throws
    func deleteDataBackupRecoveryKey() throws

    func migrateToDowngrade() throws
    func migrateToVersion0() throws
    func migrateToVersion1(myIdentity: ThreemaIdentity) throws
    
    static func deleteAllItems() throws
    static func deleteAllThisDeviceOnlyItems() throws
    static func deleteAllEncryptedItems() throws
}

Messung
CHZG
843210077

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.