Sponsored Content
Top Forums Shell Programming and Scripting how to encrypt a string using md5 Post 302521819 by catalint on Thursday 12th of May 2011 11:16:00 AM
Old 05-12-2011
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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Md5

Does anyone know a scipt that includes MD5. I need to run a script that includes MD5 encryption. Thanks (1 Reply)
Discussion started by: duncang3
1 Replies

2. Shell Programming and Scripting

Encrypt & Decrypt a String

Hi Everybody, I have a script that telnet another system. For some reasons, this is should be done by "root", so the root password has been written explicitly in this script, which mean any body read this script will know the root password of the other system. I think the solution is to write... (6 Replies)
Discussion started by: aldowsary
6 Replies

3. UNIX for Dummies Questions & Answers

Hashing or MD5

Hi, how can one find that which encryption algorithm the system is using for keeping the user password in the /etc/passwd or /etc/shadow file. Is it 1: Hashing ( which considers only first 5 letters of password) 2: MD5 (Which allows arbitry length passwords) Thanks, ~amit (0 Replies)
Discussion started by: amit4g
0 Replies

4. Programming

md5 hash a string or char array in SCO

Can someone provide me with code to md5 hash a string or character array in the SCO environment. All help is appreciated thanks. (5 Replies)
Discussion started by: jcarter2333
5 Replies

5. Shell Programming and Scripting

Encrypt/Decrypt string with rsa keys

Hello, I wanted to know if there was a way to encrypt a string, not a file using openssl and then decrypt it? I cant seem to get it to work. This is what I have been trying but I'm not having much luck. encTxt=`echo "$1" | openssl dgst -sha1 -binary | openssl rsautl -sign -inkey... (1 Reply)
Discussion started by: tjones1105
1 Replies

6. Linux

Need Help: MD5

I am trying to compare two identical files by using md5 command, but cant get the right command parameters Please help me with any examples. All I want is to know how to compare two identical files which are residing on two different machines in my local network, for example: Host_A -... (6 Replies)
Discussion started by: greenja
6 Replies

7. Shell Programming and Scripting

Help with md5 in PERL

I am a newbie in programming in Perl. My problem is that this unix command is embedded in Perl but it gives an empty output. Here's the code: $temp = `md5 "../Directory String/..." | awk {'print $NF'} > "../Directory/file.txt"`; The output file should contain the md5 hash value of the... (2 Replies)
Discussion started by: ianebaj
2 Replies

8. Shell Programming and Scripting

Encrypt and decrypt a string

Hi, I want to encrypt and decrypt a string(database password) which will be used in my scripts. encrypt the string while storing in a file and while using it in other scripts it should decrypt. i tried below method. As it can decrypt easily, it is not recommended. encrypt=`perl -e 'print unpack... (5 Replies)
Discussion started by: rohan10k
5 Replies

9. Shell Programming and Scripting

Create md5 sums and archive the resulting md5 files

Hello everyone, I am looking to basically creating md5sum files for all iso files in a directory and archive the resulting md5 files into a single archive in that very same directory. I worked out a clumsy solution such as: #find files for which md5sum are to be created and store the... (1 Reply)
Discussion started by: SurfTranquille
1 Replies

10. Shell Programming and Scripting

How to reverse the b64 format(encoded b64(b64(md5($pass)))) into md5 hash format?

I have about 1500 rows (encoded b64(b64(md5($pass))) algorythm) in a file. I would like reverse the b64 into md5 hash format. How could I do that from command line? So I need only the correct md5 hash formats. These row format: 4G5qc2WQzGES6QkWAUgl5w P9tKxonBOg3ymr8vOBLnDA... (1 Reply)
Discussion started by: freeroute
1 Replies
MD5(3)									 1								    MD5(3)

md5 - Calculate the md5 hash of a string

SYNOPSIS
string md5 (string $str, [bool $raw_output = false]) DESCRIPTION
Calculates the MD5 hash of $str using the RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. PARAMETERS
o $str - The string. o $raw_output - If the optional $raw_output is set to TRUE, then the md5 digest is instead returned in raw binary format with a length of 16. RETURN VALUES
Returns the hash as a 32-character hexadecimal number. EXAMPLES
Example #1 A md5(3) example <?php $str = 'apple'; if (md5($str) === '1f3870be274f6c49b3e31a0c6728957f') { echo "Would you like a green or red apple?"; } ?> NOTES
Note Secure password hashing It is not recommended to use this function to secure passwords, due to the fast nature of this hashing algorithm. See here for details. SEE ALSO
md5_file(3), sha1_file(3), crc32(3), sha1(3), hash(3), crypt(3), password_hash(3). PHP Documentation Group MD5(3)
All times are GMT -4. The time now is 04:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy