API Documentation Integration MsecSdk
Public Member Functions | List of all members
MsecUnitySdk.IMsecSdkClient Interface Reference

Interface defining the contract for Msec SDK client implementations. More...

Inheritance diagram for MsecUnitySdk.IMsecSdkClient:
Inheritance graph
[legend]

Public Member Functions

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

Detailed Description

Interface defining the contract for Msec SDK client implementations.

This interface specifies the core methods that all Msec SDK clients (e.g., Android, iOS) must implement to provide functionality such as initialization, certificate verification, and OTP code generation. It is used by the MsecSdk class to interact with platform-specific clients.

Member Function Documentation

◆ GetOTPCode()

string MsecUnitySdk.IMsecSdkClient.GetOTPCode ( double  timestamp)

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

Implementations must generate or fetch an OTP code using the provided timestamp, typically by calling platform-specific native functions.

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

Implemented in MsecUnitySdk.iOS.MsecSdkClient, MsecUnitySdk.DummyMsecSdkClient, MsecUnitySdk.BaseMsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.

◆ Init()

void MsecUnitySdk.IMsecSdkClient.Init ( IMsecSdkListener  listener,
MsecSdkConfig  config 
)

Initializes the Msec SDK client.

Implementations must set up the SDK with the provided listener and configuration, preparing it for subsequent operations like certificate verification or OTP generation.

Parameters
listenerThe listener to receive SDK callbacks (e.g., violations, initialization status).
configThe configuration settings for the SDK, such as debug mode and app version.

Implemented in MsecUnitySdk.iOS.MsecSdkClient, MsecUnitySdk.BaseMsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.

◆ VerifyDomainCertificate()

DomainCertificateVerificationResult MsecUnitySdk.IMsecSdkClient.VerifyDomainCertificate ( string  domain,
int  port 
)

Verifies the SSL certificate of a specified domain and port.

Implementations must check the certificate's validity and return the result, typically by interacting with platform-specific APIs or native libraries.

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.

Implemented in MsecUnitySdk.iOS.MsecSdkClient, MsecUnitySdk.DummyMsecSdkClient, MsecUnitySdk.BaseMsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.


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