Need help with SHA1

Discussion in 'C Programming' started by ruben.de.visscher@skynet.be, Jul 6, 2005.

  1. Guest

    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
    , Jul 6, 2005
    #1
    1. Advertising

  2. Jirka Klaue Guest

    :
    ....
    > 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
    Jirka Klaue, Jul 6, 2005
    #2
    1. Advertising

  3. 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) <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.
    Keith Thompson, Jul 7, 2005
    #3
  4. Jirka Klaue wrote:
    >
    > :
    > ...
    > > 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
    Wolfgang Riedel, Jul 7, 2005
    #4
  5. RubenDV Guest

    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
    RubenDV, Jul 7, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dil via .NET 247

    SHA1 length of resulting hash

    Dil via .NET 247, Aug 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    17,953
    Dil via .NET 247
    Aug 4, 2004
  2. Al Murphy

    SHA1 hash generator in hex

    Al Murphy, Mar 2, 2004, in forum: Java
    Replies:
    5
    Views:
    27,932
    darkzak
    Jan 7, 2009
  3. Rafal 'Raf256' Maj

    md5/sha1

    Rafal 'Raf256' Maj, Jul 5, 2003, in forum: C Programming
    Replies:
    2
    Views:
    536
    Shill
    Jul 5, 2003
  4. LMZ
    Replies:
    5
    Views:
    531
    Martin v. Löwis
    Apr 6, 2008
  5. Adam Tauno Williams
    Replies:
    2
    Views:
    864
    Stefan Behnel
    Dec 30, 2010
Loading...

Share This Page