Need help with SHA1

  • Thread starter ruben.de.visscher
  • Start date
R

ruben.de.visscher

Hi,

I want to make a program that checks the SHA1 message digest of a
password from the user with a list of usernames and the corresponding
message digests of their passwords. The problem is, that it simply
refuses to recognize the SHA1( ) function i use in the program. I
looked in the headerfile i included ( <openssl/sha.h> ) and the
prototype is clearly in there, but it still does'nt work! Do i have to
supply additional compiler flags or something?

Ruben
 
J

Jirka Klaue

(e-mail address removed):
....
The problem is, that it simply
refuses to recognize the SHA1( ) function i use in the program. I
looked in the headerfile i included ( <openssl/sha.h> ) and the
prototype is clearly in there, but it still does'nt work! Do i have to
supply additional compiler flags or something?

May be. How about -lssl?

Jirka
 
K

Keith Thompson

I want to make a program that checks the SHA1 message digest of a
password from the user with a list of usernames and the corresponding
message digests of their passwords. The problem is, that it simply
refuses to recognize the SHA1( ) function i use in the program. I
looked in the headerfile i included ( <openssl/sha.h> ) and the
prototype is clearly in there, but it still does'nt work! Do i have to
supply additional compiler flags or something?

The statement "it doesn't work" is almost always an indication that
you aren't giving us enough information.

How exactly does it not work? What error message are you getting?
For all we know, you could be running out of disk space, or somebody
could be unplugging your monitor every time you try to compile the
code.
 
R

RubenDV

Yes! i used the -lcrypto flag ( thanks Wolfgang Riedel ) and it worked!
To Keith Thompson, when i tried to compile it, it produced the
following output:

ld: Undefined symbols:
_SHA1

When i used -lssl it said "illegal reference to symbol _SHA1" but with
the other flag it worked perfectly!

Ruben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top