Replaced halfblock with instanciation of Basic_Block

This commit is contained in:
Leonetienne
2022-05-26 00:55:24 +02:00
parent 1f913b3a54
commit 8ddd9d6bfb
13 changed files with 25 additions and 365 deletions

View File

@@ -37,7 +37,7 @@ namespace Leonetienne::GCrypt {
}
// Pad rest with zeores
return Block(PadStringToLength(ss.str(), BLOCK_SIZE, '0', padLeft));
return Block(PadStringToLength(ss.str(), Block::BLOCK_SIZE_BITS, '0', padLeft));
}
Flexblock StringToBits(const std::string& s) {
@@ -55,7 +55,7 @@ namespace Leonetienne::GCrypt {
const std::string bitstring = bits.ToString();
for (std::size_t i = 0; i < BLOCK_SIZE; i += 8) {
for (std::size_t i = 0; i < Block::BLOCK_SIZE_BITS; i += 8) {
ss << (char)std::bitset<8>(bitstring.substr(i, 8)).to_ulong();
}