Unix/Linux Go Back    

Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and 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
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


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: 8 August 2015, 12:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 453 Times in 265 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:
$  echo hello | md5sum
b1946ac92492d2347c6235b4d2611184  -

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

Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 01:26 PM
Encrypt/Decrypt string with rsa keys tjones1105 Shell Programming and Scripting 1 10-24-2009 03:47 PM
need encrypt form syamkp Shell Programming and Scripting 0 03-08-2008 04:51 AM
encrypt my sctipt readycpbala Shell Programming and Scripting 4 01-24-2008 05:08 PM
Encrypt & Decrypt a String aldowsary Shell Programming and Scripting 6 05-15-2005 07:32 PM

All times are GMT -4. The time now is 04:06 PM.