423,867 Members | 3,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,867 IT Pros & Developers. It's quick & easy.

Need help with SHA1

P: n/a
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

Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
ru***************@skynet.be:
....
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
Nov 15 '05 #2

P: n/a
ru***************@skynet.be writes:
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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #3

P: n/a
Jirka Klaue wrote:

ru***************@skynet.be:
...
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


(additionally)

-lcrypto

might help too

Wolfgang
Nov 15 '05 #4

P: n/a
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

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.