Need help with SHA1

  • Follow


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

0
Reply ruben.de.visscher (9) 7/6/2005 1:19:00 PM

ruben.de.visscher@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
0
Reply jklaue (40) 7/6/2005 2:31:53 PM


ruben.de.visscher@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) kst-u@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.
0
Reply kst-u (21481) 7/6/2005 11:52:28 PM

Jirka Klaue wrote:
> 
> ruben.de.visscher@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
0
Reply wolfgang.riedel3 (32) 7/7/2005 8:04:27 AM

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

0
Reply ruben.de.visscher (9) 7/7/2005 4:47:50 PM

4 Replies
40 Views

(page loaded in 0.102 seconds)

Similiar Articles:













7/16/2012 1:23:16 AM


Reply: