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

  Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 05-12-2011
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 26 March 2015, 3:50 PM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 444 Times in 263 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 08:56 AM.