how to encrypt a string using md5 | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

how to encrypt a string using md5

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-12-2011
catalint catalint is offline
Registered User
 
Join Date: May 2011
Last Activity: 20 September 2011, 3:52 PM EDT
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
how to encrypt a string using md5

Hi there,

I want to encrypt a string (using md5 algorithm) using shell script. Any ideas?
Is possible only using sh or awk ?

I can't install md5sum on my solaris machine

Thanks

regards,
catalin
Sponsored Links
    #2  
Old 05-12-2011
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 20 October 2014, 3:15 PM EDT
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 437 Times in 261 Posts
Strictly speakly you can't encrypt anything with md5 because it's not an encryption algorithm. Ignoring that, you can use the digest command that appeared on Solaris 10.

On Linux:
Code:
$  echo hello | md5sum
b1946ac92492d2347c6235b4d2611184  -
$

And on Solaris 10:
Code:
$ echo hello | digest -a md5 /dev/fd/0
b1946ac92492d2347c6235b4d2611184
$

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Encrypt and decrypt a string rohan10k Shell Programming and Scripting 5 03-17-2011 12:26 PM
Encrypt/Decrypt string with rsa keys tjones1105 Shell Programming and Scripting 1 10-24-2009 02:47 PM
need encrypt form syamkp Shell Programming and Scripting 0 03-08-2008 03:51 AM
encrypt my sctipt readycpbala Shell Programming and Scripting 4 01-24-2008 04:08 PM
Encrypt & Decrypt a String aldowsary Shell Programming and Scripting 6 05-15-2005 06:32 PM



All times are GMT -4. The time now is 03:57 PM.