Loading...
Searching...
No Matches
AccelByte.Utils.TotpUtils Class Reference

Public Member Functions

string GenerateTotp (string secretKey)
 Can be used for game client to generate several digit of totp It is used when the session config's enable secret is true.
string GenerateTotp (string secretKey, GenerateTotpOptionalParameter optionalParameter)
 Can be used for game client to generate several digit of totp It is used when the session config's enable secret is true.
bool ValidateTotp (string secret, string receivedTotp, string userId)
 Can be used for Dedicated Server (DS) for secure Handshaking.

Member Function Documentation

◆ GenerateTotp() [1/2]

string AccelByte.Utils.TotpUtils.GenerateTotp ( string secretKey)
inline

Can be used for game client to generate several digit of totp It is used when the session config's enable secret is true.

Parameters
secretKeyplayer's onJoinSession secret received from lobby notification

◆ GenerateTotp() [2/2]

string AccelByte.Utils.TotpUtils.GenerateTotp ( string secretKey,
GenerateTotpOptionalParameter optionalParameter )
inline

Can be used for game client to generate several digit of totp It is used when the session config's enable secret is true.

Parameters
secretKeyplayer's onJoinSession secret received from lobby notification
optionalParameteroptional parameter that can be set
Returns

◆ ValidateTotp()

bool AccelByte.Utils.TotpUtils.ValidateTotp ( string secret,
string receivedTotp,
string userId )
inline

Can be used for Dedicated Server (DS) for secure Handshaking.

Parameters
secretsecret received from DSHub notification
receivedTotpplayer's Totp
userIdplayer's userId
Returns
reutrn whether it sitll a valid totp