chore(generator): erase -> clear
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2021-12-11 01:10:14 +01:00
parent a7e8caa26e
commit b9676226c5
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -81,7 +81,7 @@ auto Generator::do_sha(const std::string& k_n_s) -> std::string {
// no reason not to go for Keccak
CryptoPP::SHA3_256 sha3_256;
digest.erase();
digest.clear();
// FIXME: commented to test reseeds
// const std::string to_compare{
// "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
r = rr.substr(0,n*2);
rr.erase();
rr.clear();
} catch(std::exception& e) {
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.erase();
nu_G_k.clear();
/* clear out the old key and set a new one */
std::memset(G.k, 0x00, G.k.size());