MCPcopy Create free account
hub / github.com/LUX-Core/lux / UncheckedSetKey

Method UncheckedSetKey

src/cryptopp/cmac.cpp:43–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void CMAC_Base::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
44{
45 BlockCipher &cipher = AccessCipher();
46 unsigned int blockSize = cipher.BlockSize();
47
48 cipher.SetKey(key, length, params);
49 m_reg.CleanNew(3*blockSize);
50 m_counter = 0;
51
52 cipher.ProcessBlock(m_reg, m_reg+blockSize);
53 MulU(m_reg+blockSize, blockSize);
54 memcpy(m_reg+2*blockSize, m_reg+blockSize, blockSize);
55 MulU(m_reg+2*blockSize, blockSize);
56}
57
58void CMAC_Base::Update(const byte *input, size_t length)
59{

Callers

nothing calls this directly

Calls 6

MulUFunction · 0.85
memcpyFunction · 0.85
CleanNewMethod · 0.80
ProcessBlockMethod · 0.80
BlockSizeMethod · 0.45
SetKeyMethod · 0.45

Tested by

no test coverage detected