移除保存本地密码的方法
This commit is contained in:
parent
cf4b8d183b
commit
6bf4d394dc
@ -1075,25 +1075,6 @@ static bool JSB_prepareWallet(se::State& s)
|
||||
SE_BIND_FUNC(JSB_prepareWallet)
|
||||
|
||||
|
||||
static bool JSB_storeLocalPass(se::State& s)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc > 0) {
|
||||
std::string pass;
|
||||
ok = seval_to_std_string(args[0], &pass);
|
||||
SE_PRECONDITION2(ok, false, "Error processing pass");
|
||||
std::string hashstr = local_pass_hasher(pass.c_str());
|
||||
Application::getInstance()->setTmpPass(hashstr.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
||||
return false;
|
||||
}
|
||||
SE_BIND_FUNC(JSB_storeLocalPass)
|
||||
|
||||
static bool JSB_hashSvrPass(se::State& s)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
@ -1113,28 +1094,6 @@ static bool JSB_hashSvrPass(se::State& s)
|
||||
}
|
||||
SE_BIND_FUNC(JSB_hashSvrPass)
|
||||
|
||||
static bool JSB_verifyLocalPass(se::State& s)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc > 0) {
|
||||
std::string msg;
|
||||
ok = seval_to_std_string(args[0], &msg);
|
||||
SE_PRECONDITION2(ok, false, "Error processing pass");
|
||||
bool result = verify_local_pass(
|
||||
msg.c_str(),
|
||||
Application::getInstance()->getTmpPass()
|
||||
);
|
||||
s.rval().setBoolean(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 1);
|
||||
return false;
|
||||
}
|
||||
SE_BIND_FUNC(JSB_verifyLocalPass)
|
||||
|
||||
static bool JSB_walletSign(se::State& s)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
@ -1373,8 +1332,6 @@ bool jsb_register_global_variables(se::Object* global)
|
||||
__jsbObj->defineFunction("toWallet", _SE(JSB_toWallet));
|
||||
|
||||
__jsbObj->defineFunction("prepareWallet", _SE(JSB_prepareWallet));
|
||||
__jsbObj->defineFunction("storeLocalPass", _SE(JSB_storeLocalPass));
|
||||
__jsbObj->defineFunction("verifyLocalPass", _SE(JSB_verifyLocalPass));
|
||||
__jsbObj->defineFunction("hashSvrPass", _SE(JSB_hashSvrPass));
|
||||
__jsbObj->defineFunction("walletSign", _SE(JSB_walletSign));
|
||||
__jsbObj->defineFunction("walletSignTran", _SE(JSB_walletSignTran));
|
||||
|
Loading…
x
Reference in New Issue
Block a user