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

@@ -1,6 +1,7 @@
#include "GCrypt/GWrapper.h"
#include "GCrypt/GCipher.h"
#include "GCrypt/Util.h"
#include <vector>
namespace Leonetienne::GCrypt {
@@ -92,9 +93,9 @@ namespace Leonetienne::GCrypt {
// Split input into blocks
std::vector<Block> blocks;
for (std::size_t i = 0; i < data.size(); i += BLOCK_SIZE) {
for (std::size_t i = 0; i < data.size(); i += Block::BLOCK_SIZE_BITS) {
blocks.push_back(Block(
PadStringToLength(data.substr(i, BLOCK_SIZE), BLOCK_SIZE, '0', false))
PadStringToLength(data.substr(i, Block::BLOCK_SIZE_BITS), Block::BLOCK_SIZE_BITS, '0', false))
);
}