增加generate_clientid
This commit is contained in:
parent
18b5d82244
commit
ef730baa16
@ -1447,6 +1447,15 @@ std::string decrypt_aes(std::string &content, std::string &key)
|
|||||||
{
|
{
|
||||||
return aes_decrypt(content.c_str(), key.c_str());
|
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)
|
bool jsb_register_global_variables(se::Object *global)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace se {
|
namespace se
|
||||||
|
{
|
||||||
class Object;
|
class Object;
|
||||||
class Class;
|
class Class;
|
||||||
class Value;
|
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 encrypt_aes(std::string &content, std::string &key);
|
||||||
std::string decrypt_aes(std::string &content, std::string &key);
|
std::string decrypt_aes(std::string &content, std::string &key);
|
||||||
|
std::string generate_clientid(std::string &content);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user