mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
SSUHeader and authenticate added
This commit is contained in:
3
hmac.h
3
hmac.h
@@ -19,7 +19,7 @@ namespace crypto
|
||||
// block size is 64 bytes
|
||||
{
|
||||
size_t totalLen = len + 64 + 32;
|
||||
uint8_t * buf = new uint8_t[totalLen]; // TODO: reuse buffers
|
||||
uint8_t buf[2048];
|
||||
// ikeypad
|
||||
((uint64_t *)buf)[0] = ((uint64_t *)key)[0] ^ IPAD;
|
||||
((uint64_t *)buf)[1] = ((uint64_t *)key)[1] ^ IPAD;
|
||||
@@ -51,7 +51,6 @@ namespace crypto
|
||||
|
||||
// calculate digest
|
||||
CryptoPP::Weak1::MD5().CalculateDigest (digest, buf, totalLen);
|
||||
delete[] buf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user