seeking basic level help with cryptlib
uttarauk uttarauk <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am a beginner and just downloaded the cryptlib 3.3.3 to Ubuntu. I
tried to compile a very basic level code to just to see if the library is
build properly. Below is the code. It worked without errors:
#include<stdio.h>
#include "cryptlib.h"
int main(void){
cryptInit();
cryptEnd();
return 0;
}
I then copy-pasted the sample code in the manual:
#include<stdio.h>
#include "cryptlib.h"
int main(void){
cryptInit();
/* Create an envelope for the message */
cryptCreateEnvelope( &cryptEnvelope, cryptUser, CRYPT_FORMAT_SMIME
);
/* Push in the message recipient's name */
cryptSetAttributeString( cryptEnvelope, CRYPT_ENVINFO_RECIPIENT,
recipientName,
recipientNameLength );
/* Push in the message data and pop out the signed and encrypted
result */
cryptPushData( cryptEnvelope, message, messageSize, &bytesIn );
cryptFlushData( cryptEnvelope );
cryptPopData( cryptEnvelope, encryptedMessage, encryptedSize,
&bytesOut );
/* Clean up */
cryptDestroyEnvelope( cryptEnvelope );
cryptEnd();
return 0;
}
This gives several errors like:
test1.c: In function ‘main’:
test1.c:15: error: ‘cryptEnvelope’ undeclared (first use in this function)
test1.c:15: error: (Each undeclared identifier is reported only once
test1.c:15: error: for each function it appears in.)
test1.c:15: error: ‘cryptUser’ undeclared (first use in this function)
test1.c:18: error: ‘recipientName’ undeclared (first use in this function)
test1.c: error: ‘recipientNameLength’ undeclared (first use in this
function)
test1.c: error: ‘message’ undeclared (first use in this function)
test1.c:21: error: ‘messageSize’ undeclared (first use in this function)
test1.c:21: error: ‘bytesIn’ undeclared (first use in this function)
test1.c:23: error: ‘encryptedMessage’ undeclared (first use in this
function)
test1.c:23: error: ‘encryptedSize’ undeclared (first use in this function)
test1.c:24: error: ‘bytesOut’ undeclared (first use in this function)
It clearly is asking for the values of the variables. Could someone please
help me understand what I must do to get this working. If someone has sample
codes, it would be great if you could share.
_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.