Expose DES key size through DesCrypt, DesCrypt::Encryptor, DesCrypt::Decryptor.

This commit is contained in:
hashlag
2026-02-07 18:02:27 +03:00
parent 3059bd4c66
commit 151c93560c

View File

@@ -198,8 +198,10 @@ class DesCrypt
public:
using Block = uint64_t;
static constexpr size_t BlockSize = 8;
static constexpr size_t KeySize = 8;
static_assert(BlockSize == sizeof(Block));
static_assert(KeySize == Inner_::RawKey::Size());
DesCrypt() = delete;
@@ -232,6 +234,7 @@ public:
{
public:
static constexpr size_t BlockSize = DesCrypt::BlockSize;
static constexpr size_t KeySize = DesCrypt::KeySize;
DesEncryptor(const Key & key)
: Schedule_(Inner_::KeySchedule::Direction::Encrypt, key.Key_)
@@ -275,6 +278,7 @@ public:
{
public:
static constexpr size_t BlockSize = DesCrypt::BlockSize;
static constexpr size_t KeySize = DesCrypt::KeySize;
DesDecryptor(const Key & key)
: Schedule_(Inner_::KeySchedule::Direction::Decrypt, key.Key_)