Updated to PTR build 11655.

This commit is contained in:
tomrus88 2010-03-13 00:50:15 +03:00
parent e73c5d3b79
commit 768772b14b
12 changed files with 23 additions and 21 deletions

View file

@ -21,10 +21,8 @@
HmacHash::HmacHash(uint32 len, uint8 *seed)
{
ASSERT(len == SEED_KEY_SIZE);
HMAC_CTX_init(&m_ctx);
HMAC_Init_ex(&m_ctx, seed, SEED_KEY_SIZE, EVP_sha1(), NULL);
HMAC_Init_ex(&m_ctx, seed, len, EVP_sha1(), NULL);
}
HmacHash::~HmacHash()
@ -42,6 +40,11 @@ void HmacHash::UpdateData(const uint8 *data, int length)
HMAC_Update(&m_ctx, data, length);
}
void HmacHash::UpdateData(const std::string &str)
{
UpdateData((uint8 const*)str.c_str(), str.length());
}
void HmacHash::Finalize()
{
uint32 length = 0;