Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Need help with SHA1

Reply
Thread Tools

Need help with SHA1

 
 
ruben.de.visscher@skynet.be
Guest
Posts: n/a
 
      07-06-2005
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

 
Reply With Quote
 
 
 
 
Jirka Klaue
Guest
Posts: n/a
 
      07-06-2005
http://www.velocityreviews.com/forums/(E-Mail 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
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      07-06-2005
(E-Mail Removed) 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) (E-Mail Removed) <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.
 
Reply With Quote
 
Wolfgang Riedel
Guest
Posts: n/a
 
      07-07-2005
Jirka Klaue wrote:
>
> (E-Mail 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


(additionally)

-lcrypto

might help too

Wolfgang
 
Reply With Quote
 
RubenDV
Guest
Posts: n/a
 
      07-07-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA) Adam Tauno Williams Python 2 12-30-2010 10:23 AM
SHA1 hash generator in hex Al Murphy Java 5 01-07-2009 04:33 PM
Form sha1.hexdigest to sha1.digest LMZ Python 5 04-06-2008 09:50 PM
SHA1 length of resulting hash Dil via .NET 247 ASP .Net 0 08-04-2004 12:53 PM
md5/sha1 Rafal 'Raf256' Maj C Programming 2 07-05-2003 08:02 AM



Advertisments