SyncCredentials

public class SyncCredentials

Credentials for authenticating the client when connecting to a sync server/peer. E.g. use SyncCredentials.makeSharedSecret(secret).

  • No authentication, insecure. Use only for development and testing purposes.

    Declaration

    Swift

    public static func makeNone() -> SyncCredentials
  • Authenticate with a pre-shared secret.

    Declaration

    Swift

    public static func makeSharedSecret(_ data: Data) -> SyncCredentials
  • Authenticate with a pre-shared key. The given string will be UTF-8 encoded.

    Declaration

    Swift

    public static func makeSharedSecret(_ string: String) -> SyncCredentials