| 102 | |
| 103 | |
| 104 | void 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 | |
| 116 | void CRC4EncryptableBuffer::RC4CreateKey(const uint8* pachKeyData, uint32 nLen, bool bSkipDiscard) |
no test coverage detected