API Documentation Integration MsecSdk
Static Public Member Functions | Static Public Attributes | Properties | List of all members
MsecUnitySdk.MsecSdk Class Reference

A singleton class that provides an interface to the Msec SDK for Unity. More...

Collaboration diagram for MsecUnitySdk.MsecSdk:
Collaboration graph
[legend]

Static Public Member Functions

static void Init (IMsecSdkListener listener, MsecSdkConfig config)
 Initializes the Msec SDK with a listener and configuration. More...
 
static string GetOTPCode (double timestamp)
 Retrieves an OTP (One-Time Password) code based on a timestamp. More...
 
static DomainCertificateVerificationResult VerifyDomainCertificate (string domain, int port)
 Verifies the certificate of a specified domain and port. More...
 

Static Public Attributes

static MsecSdk instance
 The static singleton instance of the MsecSdk class.
 

Properties

static MsecSdk Instance [get]
 Gets the singleton instance of the MsecSdk class. More...
 

Detailed Description

A singleton class that provides an interface to the Msec SDK for Unity.

This class manages the initialization and interaction with platform-specific implementations of the Msec SDK (e.g., Android, iOS, or a dummy client). It uses a singleton pattern to ensure a single instance is used throughout the application.

Member Function Documentation

◆ GetOTPCode()

static string MsecUnitySdk.MsecSdk.GetOTPCode ( double  timestamp)
inlinestatic

Retrieves an OTP (One-Time Password) code based on a timestamp.

Delegates the request to the platform-specific client.

Parameters
timestampThe timestamp used to generate the OTP code.
Returns
A string representing the OTP code.

◆ Init()

static void MsecUnitySdk.MsecSdk.Init ( IMsecSdkListener  listener,
MsecSdkConfig  config 
)
inlinestatic

Initializes the Msec SDK with a listener and configuration.

This method must be called before using other Msec SDK functionalities. It delegates the initialization to the platform-specific client.

Parameters
listenerThe listener to receive SDK callbacks (e.g., violations, initialization status).
configThe configuration settings for the SDK.

◆ VerifyDomainCertificate()

static DomainCertificateVerificationResult MsecUnitySdk.MsecSdk.VerifyDomainCertificate ( string  domain,
int  port 
)
inlinestatic

Verifies the certificate of a specified domain and port.

Delegates the verification to the platform-specific client.

Parameters
domainThe domain name to verify (e.g., "google.com").
portThe port number to check (e.g., 443 for HTTPS).
Returns
A DomainCertificateVerificationResult indicating the verification outcome.

Property Documentation

◆ Instance

MsecSdk MsecUnitySdk.MsecSdk.Instance
staticget

Gets the singleton instance of the MsecSdk class.

Lazily initializes the instance if it doesn't already exist.

Returns
The singleton instance of MsecSdk.

The documentation for this class was generated from the following file: