| 129 | } |
| 130 | |
| 131 | void cIDEA::SetKey(iCipher::EncryptionDir dir, const cHashedKey128& key) |
| 132 | { |
| 133 | // some things we are assuming |
| 134 | ASSERT(IDEA::KEYLENGTH == 16); |
| 135 | ASSERT(mpData); |
| 136 | |
| 137 | delete mpData->mpIDEA; |
| 138 | mpData->mpIDEA = new IDEA((byte*)key.GetKey(), dir == iCipher::ENCRYPT ? ENCRYPTION : DECRYPTION); |
| 139 | } |
| 140 | |
| 141 | // return the size of data block this crypter works on |
| 142 | int cIDEA::GetBlockSizePlain() |