generator: make some internal vars const
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
c40806e68d
commit
8f0f29d190
|
@ -92,11 +92,11 @@ auto Generator::do_crypto() -> std::string {
|
|||
// https://www.cryptopp.com/wiki/CTR_Mode
|
||||
|
||||
// William Shakespeare, Romeo and Juliet
|
||||
std::string plain{"Oh, I am fortune's fool!"};
|
||||
const std::string plain{"Oh, I am fortune's fool!"};
|
||||
std::string cipher, encoded_c;
|
||||
std::unique_lock<std::mutex> ul(crypt_mtx);
|
||||
// in case we need to convert counter to string
|
||||
std::string str_ctr{reinterpret_cast<const char*>(&G.ctr)};
|
||||
const std::string str_ctr{reinterpret_cast<const char*>(&G.ctr)};
|
||||
// 16 bytes --> 128bit
|
||||
static constexpr const std::size_t ctr_length{16};
|
||||
CryptoPP::FixedSizeSecBlock<CryptoPP::byte, ctr_length> ctr;
|
||||
|
|
Reference in New Issue