MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / SetKey

Method SetKey

src/twcrypto/crypto.cpp:131–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void 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
142int cIDEA::GetBlockSizePlain()

Callers 6

SetWriteMethod · 0.80
SetReadMethod · 0.80
ProtectKeysMethod · 0.80
GetPrivateKeyMethod · 0.80
TestCryptoFunction · 0.80
TestCryptoArchiveFunction · 0.80

Calls 1

GetKeyMethod · 0.45

Tested by 2

TestCryptoFunction · 0.64
TestCryptoArchiveFunction · 0.64