CoreCrypto
public final class CoreCrypto : CoreCryptoFfi, CoreCryptoProtocol, @unchecked Sendable
CoreCrypto client which manages one cryptographic client for proteus and MLS.
-
Initialise CoreCrypto with an encrypted key store.
Declaration
Swift
public convenience init(database: Database) throwsParameters
keystorePathpath to the encrypted key store
keysecret key to unlock the encrypted key store
-
historyClient(_:Asynchronous) Instantiate a history client.
This client exposes the full interface of
CoreCrypto, but it should only be used to decrypt messages. Other use is a logic error.Declaration
Swift
public static func historyClient(_ historySecret: HistorySecret) async throws -> CoreCrypto -
transaction(_:Asynchronous) Declaration
Swift
public func transaction<Result>( _ block: @escaping (_ context: CoreCryptoContextProtocol) async throws -> Result ) async throws -> Result -
registerEpochObserver(_:Asynchronous) Undocumented
Declaration
Swift
public func registerEpochObserver(_ epochObserver: EpochObserver) async throws -
registerHistoryObserver(_:Asynchronous) Undocumented
Declaration
Swift
public func registerHistoryObserver(_ historyObserver: HistoryObserver) async throws -
Returns the last resort PreKey id
Declaration
Swift
public static func proteusLastResortPrekeyId() throws -> UInt16 -
Proteus public key fingerprint It’s basically the public key encoded as an hex string
Returns Hex-encoded public key string
Declaration
Swift
public static func proteusFingerprintPrekeybundle(prekey: Data) throws -> String