Rename RawKeyArray --> RawKey since it's not an 'array of raw keys'

This commit is contained in:
hashlag
2026-01-21 23:35:15 +03:00
parent 9e67a7e4f4
commit fa042e7abf
2 changed files with 5 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ struct Bitwise
} }
}; };
using RawKeyArray = Service::SeArray<uint8_t, 8>; using RawKey = Service::SeArray<uint8_t, 8>;
class KeySchedule class KeySchedule
{ {
@@ -98,9 +98,9 @@ public:
using RoundKey48 = uint64_t; using RoundKey48 = uint64_t;
KeySchedule(const RawKeyArray & rawKeyArray) KeySchedule(const RawKey & rawKey)
{ {
Key56 key56 = Pc1(Bitwise::PackUInt64(rawKeyArray.Begin(), rawKeyArray.End())); Key56 key56 = Pc1(Bitwise::PackUInt64(rawKey.Begin(), rawKey.End()));
auto [c28, d28] = Bitwise::Split<28>(key56); auto [c28, d28] = Bitwise::Split<28>(key56);
@@ -204,7 +204,7 @@ public:
} }
private: private:
Inner_::RawKeyArray Key_; Inner_::RawKey Key_;
}; };
template<typename OutputIt, typename InputIt> template<typename OutputIt, typename InputIt>

View File

@@ -6,7 +6,7 @@ using namespace Chaos::Cipher::Des;
TEST(DesCryptTests, KeyScheduleTest) TEST(DesCryptTests, KeyScheduleTest)
{ {
Inner_::RawKeyArray key; Inner_::RawKey key;
key[0] = 0b00010011; key[0] = 0b00010011;
key[1] = 0b00110100; key[1] = 0b00110100;