MCPcopy Create free account
hub / github.com/amule-project/amule / SetKey

Method SetKey

src/RC4Encrypt.cpp:104–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103
104void CRC4EncryptableBuffer::SetKey(const MD5Sum& keyhash, bool bSkipDiscard)
105{
106 wxASSERT(!m_hasKey);
107 if (!m_hasKey) {
108 m_hasKey = true;
109 RC4CreateKey( keyhash.GetRawHash(), 16, bSkipDiscard);
110 } else {
111 throw std::runtime_error( "(CRC4EncryptableBuffer::SetKey): SetKey() has been called twice.");
112 }
113}
114
115
116void CRC4EncryptableBuffer::RC4CreateKey(const uint8* pachKeyData, uint32 nLen, bool bSkipDiscard)

Callers 6

DecryptReceivedClientMethod · 0.80
EncryptSendClientMethod · 0.80
DecryptReceivedServerMethod · 0.80
EncryptSendServerMethod · 0.80
NegotiateMethod · 0.80

Calls 1

GetRawHashMethod · 0.45

Tested by

no test coverage detected