Scrub privkeys from memory after done

This commit is contained in:
jl777
2019-07-15 04:06:20 -11:00
parent 9ac1b1fea8
commit ab4619c98b
14 changed files with 119 additions and 44 deletions

View File

@@ -453,6 +453,7 @@ int64_t AddChannelsInputs(struct CCcontract_info *cp,CMutableTransaction &mtx, C
Myprivkey(myprivkey);
if (tokenid!=zeroid) CCaddrTokens1of2set(cp,srcpub,destpub,myprivkey,coinaddr);
else CCaddr1of2set(cp,srcpub,destpub,myprivkey,coinaddr);
memset(myprivkey,0,32);
return totalinputs;
}
else return 0;