增加generate_clientid

This commit is contained in:
CounterFire2023 2023-08-17 16:55:01 +08:00
parent 18b5d82244
commit ef730baa16
2 changed files with 24 additions and 13 deletions

View File

@ -1447,6 +1447,15 @@ std::string decrypt_aes(std::string &content, std::string &key)
{
return aes_decrypt(content.c_str(), key.c_str());
}
std::string generate_clientid(std::string &msg)
{
std::string pk = "02aaaafbd375639879d6a694893dd14413662d90c59abaceb6cc4c791aa0834352";
// attach client id to msg
std::string msg_str = msg;
msg_str += "_clientid";
std::string str_encrypt = rencrypt(pk.c_str(), msg_str.c_str());
return str_encrypt;
}
bool jsb_register_global_variables(se::Object *global)
{

View File

@ -27,7 +27,8 @@
#include <string>
namespace se {
namespace se
{
class Object;
class Class;
class Value;
@ -51,3 +52,4 @@ bool jsb_global_load_image(const std::string& path, const se::Value& callbackVal
std::string encrypt_aes(std::string &content, std::string &key);
std::string decrypt_aes(std::string &content, std::string &key);
std::string generate_clientid(std::string &content);