Find the answer to your Linux question:
Results 1 to 5 of 5
Hi folks, Ubuntu 8.04 I have libdigest-sha1-perl installed on repo. But I can't find it running; Code: # which sha1/sha-1/SHA1/SHA-1 Please advise which package provides SHA1? TIA B.R. satimis...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,815

    About SHA1


    Hi folks,


    Ubuntu 8.04

    I have libdigest-sha1-perl installed on repo. But I can't find it running;
    Code:
    # which sha1/sha-1/SHA1/SHA-1
    Please advise which package provides SHA1? TIA

    B.R.
    satimis

  2. #2
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Have you tried sha1sum? I believe it belongs to the coreutils package.

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,815
    Quote Originally Posted by Thrillhouse View Post
    Have you tried sha1sum? I believe it belongs to the coreutils package.
    Hi Thrillhouse,

    I need SHA1 command reading a text-password generating SHA1 hash to compare the encrypted passwords stored on MySQL database table. Can sha1sum work for me. TIA

    B.R.
    satimis

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    How are you trying to do this? A bash script? Perl? PHP? sha1sum would be suitable for a bash script. Perl and PHP have their own libraries (the Perl version, you have installed) for doing this. For Perl, it looks like the appropriate syntax would be:
    Code:
    use Digest::SHA1  qw(sha1 sha1_hex sha1_base64);
    
    $digest = sha1($data);

  6. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,815
    Quote Originally Posted by Thrillhouse View Post
    How are you trying to do this? A bash script? Perl? PHP? sha1sum would be suitable for a bash script. Perl and PHP have their own libraries (the Perl version, you have installed) for doing this. For Perl, it looks like the appropriate syntax would be:
    Code:
    use Digest::SHA1  qw(sha1 sha1_hex sha1_base64);
    
    $digest = sha1($data);
    Hi Thrillhouse,

    Ubuntu 8.04, 32bit

    Thanks for your advice. Please provide me more detail how to do it.

    E.g.;

    I use "apassword" creating an encrypted password on a MySQL database table. The encrypted password on the table is "aaabbbcccddd" for example. The user with the plain password "apassword" can't login. I need to check the SHA1 hash on the said password on terminal for manual comparison. What command line shall I use? TIA

    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •