31
30
void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length)
33
32
assert(direction == ENCRYPTION);
34
this->AssertValidKeyLength(length);
35
memcpy_s(m_key, m_key.size(), userKey, this->KEYLENGTH);
36
T::CorrectEndianess(Key(), Key(), this->KEYLENGTH);
33
AssertValidKeyLength(length);
34
memcpy(Key(), userKey, KEYLENGTH);
35
T::CorrectEndianess(Key(), Key(), KEYLENGTH);
39
38
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
41
T::CorrectEndianess(Buffer(), (HashWordType *)inBlock, this->BLOCKSIZE);
40
T::CorrectEndianess(Buffer(), (HashWordType *)inBlock, BLOCKSIZE);
42
41
T::Transform(Buffer(), Key());
45
T::CorrectEndianess(Buffer(), Buffer(), this->BLOCKSIZE);
46
xorbuf(outBlock, xorBlock, m_buffer, this->BLOCKSIZE);
44
T::CorrectEndianess(Buffer(), Buffer(), BLOCKSIZE);
45
xorbuf(outBlock, xorBlock, m_buffer, BLOCKSIZE);
49
T::CorrectEndianess((HashWordType *)outBlock, Buffer(), this->BLOCKSIZE);
48
T::CorrectEndianess((HashWordType *)outBlock, Buffer(), BLOCKSIZE);
52
51
bool IsPermutation() const {return false;}