From 0ca97cc33631d2d0d8ec783bfd6555a5fb9a60e7 Mon Sep 17 00:00:00 2001 From: hashlag Date: Sat, 24 Jan 2026 23:53:04 +0300 Subject: [PATCH] Use DesCrypt::Block type alias in EncryptBlock()/DecryptBlock() signatures --- Chaos/Cipher/Des/DesCrypt.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Chaos/Cipher/Des/DesCrypt.hpp b/Chaos/Cipher/Des/DesCrypt.hpp index b2dda46..96a5fb1 100644 --- a/Chaos/Cipher/Des/DesCrypt.hpp +++ b/Chaos/Cipher/Des/DesCrypt.hpp @@ -192,6 +192,8 @@ namespace Chaos::Cipher::Des class DesCrypt { public: + using Block = uint64_t; + DesCrypt() = delete; class Key @@ -245,7 +247,7 @@ public: Inner_::Bitwise::CrunchUInt64(out, encrypted); } - uint64_t EncryptBlock(uint64_t block) + Block EncryptBlock(Block block) { return DesCrypt::ProcessBlock(block, Schedule_); } @@ -280,7 +282,7 @@ public: Inner_::Bitwise::CrunchUInt64(out, decrypted); } - uint64_t DecryptBlock(uint64_t block) + Block DecryptBlock(Block block) { return DesCrypt::ProcessBlock(block, Schedule_); } @@ -290,7 +292,6 @@ public: }; private: - using Block = uint64_t; using BlockHalf = uint32_t; using RawBlockArray = Service::SeArray; using Data48 = uint64_t;