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.
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT PHP
hash
HASH(3) 1 HASH(3)hash - Generate a hash value (message digest)SYNOPSIS
string hash (string $algo, string $data, [bool $raw_output = false])
DESCRIPTION PARAMETERS
o $algo
- Name of selected hashing algorithm (e.g. "md5", "sha256", "haval160,4", etc..)
o $data
- Message to be hashed.
o $raw_output
- When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
RETURN VALUES
Returns a string containing the calculated message digest as lowercase hexits unless $raw_output is set to true in which case the raw
binary representation of the message digest is returned.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.4.0 | |
| | |
| | The tiger algorithm now uses big-endian byte |
| | ordering. See also example below. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
A hash(3) example
<?php
echo hash('ripemd160', 'The quick brown fox jumped over the lazy dog.');
?>
The above example will output:
ec457d0a974c48d5685a7efa03d137dc8bbde7e3
Example #2
Calculate pre PHP-5.4 tiger hashes with PHP-5.4 and higher
<?php
function old_tiger($data = "", $width=192, $rounds = 3) {
return substr(
implode(
array_map(
function ($h) {
return str_pad(bin2hex(strrev($h)), 16, "0");
},
str_split(hash("tiger192,$rounds", $data, true), 8)
)
),
0, 48-(192-$width)/4
);
}
echo hash('tiger192,3', 'a-string'), PHP_EOL;
echo old_tiger('a-string'), PHP_EOL;
?>
Output of the above example in PHP 5.3:
146a7492719b3564094efe7abbd40a7416fd900179d02773
64359b7192746a14740ad4bb7afe4e097327d0790190fd16
Output of the above example in PHP 5.4:
64359b7192746a14740ad4bb7afe4e097327d0790190fd16
146a7492719b3564094efe7abbd40a7416fd900179d02773
SEE ALSO hash_file(3), hash_hmac(3), hash_init(3), md5(3), sha1(3).
PHP Documentation Group HASH(3)