CSM_Free3::SMTI_DigestData
[email protected] Tue, 10 Jul 2001 09:58:27 -0400
| Newsgroups | gmane.ietf.sfl |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I want to know why we do not use CryptoPP::SHA when we want to do hash with
SHA algorithm ????? (we use internal function)
/***************************************************************************************/
(line 2134)
//////////////////////////////////////////////////////////////////////////
// SMTI_DigestData uses CSM_Common for SHA1 and Crypto++ for MD5
SM_RET_VAL CSM_Free3::SMTI_DigestData(
CSM_Buffer *pData, // input
CSM_Buffer *pDigest) // output
{
CSM_OID *poidDigest = NULL;
char *pchData;
long lBytesRead;
SME_SETUP("CSM_Free3::SMTI_DigestData");
// find out what the preferred digest alg is
if ((poidDigest = GetPrefDigest()) == NULL)
SME_THROW(SM_FREE_NO_DIGEST_ALG, NULL, NULL);
if (*poidDigest == sha_1 || *poidDigest == id_dsa_with_sha1 ||
// *poidDigest == sha_1WithRSAEncryption_ALT ||
*poidDigest == sha_1WithRSAEncryption)
{
// do SHA1 digest using common CTI
SME(CSM_Common::SMTI_DigestData(pData, pDigest));
}
else if (*poidDigest == md5 ||
*poidDigest == md5WithRSAEncryption)
{
bool bLastBlock = false; // set to true when this is the last block
// do MD5 digest
MD5 md5;
....
}
/***************************************************************************************/
CSM_Free3 is not supposed to use Crypto++ library ?????
Thanks.
**************************************************************************
Eric Boudreault
------------------------------------------------
Programmeur
------------------------------------------------
Motus Technologies
390, St-Vallier Est
Bureau 100
Québec, Qc
G1K 3P6
Tél.: 521-2100 ext.#242
Fax.: 521-2101
courriel: [email protected]
**************************************************************************