SecureChat

@objc(VSRSecureChat)
open class SecureChat : NSObject

SecureChat. Class for rotating keys, starting and responding to conversation

Extension with objective-c methods

  • Starts new session with given participant using his identity card

    Declaration

    Swift

    @objc
    func startNewSessionAsSender(receiverCard: Card, name: String? = nil, enablePostQuantum: Bool,
                                 completion: @escaping (_ session: SecureSession?, _ error: Error?) -> Void)

    Parameters

    receiverCard

    receiver identity cards

    name

    Session name

    enablePostQuantum

    enablePostQuantum

    completion

    completion handler

    session

    created SecureSession

    error

    corresponding error

  • Starts multiple new sessions with given participants using their identity cards

    Declaration

    Swift

    @objc
    func startMultipleNewSessionsAsSender(receiverCards: [Card], name: String? = nil, enablePostQuantum: Bool,
                                          completion: @escaping (_ sessions: [SecureSession]?,
                                                                 _ error: Error?) -> Void)

    Parameters

    receiverCards

    receivers identity cards

    name

    Session name

    enablePostQuantum

    enablePostQuantum

    completion

    completion handler

    sessions

    array with created SecureSessions

    error

    corresponding error

  • Rotates keys. See rotateKeys() -> GenericOperation for details

    Declaration

    Swift

    @objc
    func rotateKeys(completion: @escaping (_ rotationLog: RotationLog?, _ error: Error?) -> Void)

    Parameters

    completion

    completion handler

    rotationLog

    represents the result of rotateKeys operation

    error

    corresponding error

  • Removes all data corresponding to this user: sessions and keys.

    Declaration

    Swift

    @objc
    func reset(completion: @escaping (_ error: Error?) -> Void)

    Parameters

    completion

    completion handler

    error

    corresponding error