Hi Gecko,

Have you visited the following page:
http://www.eskimo.com/~weidai/cgi-bin/fom-serve/cache/1.html? It has some
basic samples.

Otherwise, I like to use Wei's validation suite a big sample application.

Jeff

----- Original Message ----- 
From: "The Gecko" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, September 05, 2005 11:06 PM
Subject: Re: `CBC_MAC' undeclared (first use this function) (BUT SHA WORKS)


> DOH
>
> Removing the
> #define line and using
>
> const byte mac1[] = { // from FIPS 113
> 0x73, 0x51, 0xcb, 0xda, 0x29, 0x31, 0x31, 0x62};
> const byte mac2[] = { // generated with Crypto++
> 0x35, 0x80, 0xC5, 0xC4, 0x6B, 0x81, 0x24, 0xE2};
> byte * bufferzz1;
> bufferzz1 = (byte*) malloc (8);
>
>
> CBC_MAC<DES>(mac1, sizeof(mac1)).CalculateDigest(bufferzz1, buffery,
> sizeof(buffery));
> cout<<"CBC<DES: "<<bufferzz1<<std::endl;
>
> Kind of works. Is this the correct way of doing things? I only ask
> because...
>
> $ ./a.out
> What is the file to encrypt:
> photo1.jpg
> HMAC<SHA: ¬µª=ØG`Aª8Dì3= É
> CBC<DES: 5KÈZ
>
> $ ./a.out
> What is the file to encrypt:
> photo2.jpg
> HMAC<SHA: Åä▒»º×T*IÚþôH
> CBC<DES: 5KÈZ
>
> $ ./a.out
> What is the file to encrypt:
> network.h
> HMAC<SHA: B þ¦úPÔ´ó (Ru¨
> CBC<DES: ÃD(r)ÌD*
>
> I'm guessing something is wrong but what? Given photo1 is 1.3MB and photo2
> 32K
>

Reply via email to