tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::EncryptedCredentials Struct Reference

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. https://core.telegram.org/bots/api#encryptedcredentials. More...

#include <EncryptedCredentials.hpp>

Public Member Functions

 EncryptedCredentials ()=default
 
 EncryptedCredentials (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string data
 Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication. More...
 
std::string hash
 Base64-encoded data hash for data authentication. More...
 
std::string secret
 Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption. More...
 

Detailed Description

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. https://core.telegram.org/bots/api#encryptedcredentials.

Definition at line 8 of file EncryptedCredentials.hpp.

Constructor & Destructor Documentation

◆ EncryptedCredentials() [1/2]

tgbotxx::EncryptedCredentials::EncryptedCredentials ( )
default

◆ EncryptedCredentials() [2/2]

tgbotxx::EncryptedCredentials::EncryptedCredentials ( const nl::json &  json)
inlineexplicit

Definition at line 10 of file EncryptedCredentials.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::EncryptedCredentials::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 36 of file EncryptedCredentials.hpp.

◆ toJson()

nl::json tgbotxx::EncryptedCredentials::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 27 of file EncryptedCredentials.hpp.

Member Data Documentation

◆ data

std::string tgbotxx::EncryptedCredentials::data

Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication.

Definition at line 16 of file EncryptedCredentials.hpp.

◆ hash

std::string tgbotxx::EncryptedCredentials::hash

Base64-encoded data hash for data authentication.

Definition at line 19 of file EncryptedCredentials.hpp.

◆ secret

std::string tgbotxx::EncryptedCredentials::secret

Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption.

Definition at line 22 of file EncryptedCredentials.hpp.


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