chore(generator): erase -> clear
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a7e8caa26e
commit
b9676226c5
|
@ -81,7 +81,7 @@ auto Generator::do_sha(const std::string& k_n_s) -> std::string {
|
||||||
// no reason not to go for Keccak
|
// no reason not to go for Keccak
|
||||||
CryptoPP::SHA3_256 sha3_256;
|
CryptoPP::SHA3_256 sha3_256;
|
||||||
|
|
||||||
digest.erase();
|
digest.clear();
|
||||||
// FIXME: commented to test reseeds
|
// FIXME: commented to test reseeds
|
||||||
// const std::string to_compare{
|
// const std::string to_compare{
|
||||||
// "8eccfbbbc9df48b4272e6237ce45aad8fbe59629b4963c4dcda5716e61bb34e1"
|
// "8eccfbbbc9df48b4272e6237ce45aad8fbe59629b4963c4dcda5716e61bb34e1"
|
||||||
|
@ -208,7 +208,7 @@ auto Generator::generate_random_data(uint n) -> std::string {
|
||||||
|
|
||||||
// since we're truncating hex, we need to get twice more characters
|
// since we're truncating hex, we need to get twice more characters
|
||||||
r = rr.substr(0,n*2);
|
r = rr.substr(0,n*2);
|
||||||
rr.erase();
|
rr.clear();
|
||||||
} catch(std::exception& e) {
|
} catch(std::exception& e) {
|
||||||
fmt::print("{}", e.what());
|
fmt::print("{}", e.what());
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ auto Generator::generate_random_data(uint n) -> std::string {
|
||||||
nu_G_k,true,new CryptoPP::HexDecoder(new CryptoPP::StringSink(dst))
|
nu_G_k,true,new CryptoPP::HexDecoder(new CryptoPP::StringSink(dst))
|
||||||
);
|
);
|
||||||
|
|
||||||
nu_G_k.erase();
|
nu_G_k.clear();
|
||||||
|
|
||||||
/* clear out the old key and set a new one */
|
/* clear out the old key and set a new one */
|
||||||
std::memset(G.k, 0x00, G.k.size());
|
std::memset(G.k, 0x00, G.k.size());
|
||||||
|
|
Reference in New Issue