CoreCrypto
public final class CoreCrypto : CoreCryptoProtocol
CoreCrypto client which manages one cryptographic client for proteus and MLS.
-
init(keystorePath:
Asynchronouskey: ) Initialise CoreCrypto with an encrypted key store.
Declaration
Swift
public convenience init(keystorePath: String, key: DatabaseKey) async throws
Parameters
keystorePath
path to the encrypted key store
key
secret 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
-
provideTransport(transport:
Asynchronous) Declaration
Swift
public func provideTransport(transport: any MlsTransport) async throws
-
registerEpochObserver(_:
Asynchronous) Declaration
Swift
public func registerEpochObserver(_ epochObserver: EpochObserver) async throws
-
registerHistoryObserver(_:
Asynchronous) Declaration
Swift
public func registerHistoryObserver(_ historyObserver: HistoryObserver) async throws
-
isHistorySharingEnabled(conversationId:
Asynchronous) Declaration
Swift
public func isHistorySharingEnabled(conversationId: ConversationId) async throws -> Bool
-
Declaration
Swift
public static func setLogger(_ logger: CoreCryptoLogger)
-
Declaration
Swift
public static func setMaxLogLevel(_ level: CoreCryptoLogLevel)
-
Declaration
Swift
public static func version() -> String
-
Declaration
Swift
public static func buildMetadata() -> BuildMetadata