Sponsored Content
Full Discussion: Digest MD5
Top Forums UNIX for Advanced & Expert Users Digest MD5 Post 37711 by tamemi on Thursday 26th of June 2003 10:38:24 AM
Old 06-26-2003
Sorry RTM i did not get you exactly ... by LD path ?!!
 

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. 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

3. 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

4. UNIX for Dummies Questions & Answers

Different MD5 value when using 'digest' command

Hi guys, I need to anonymise some data; Some of it in an Oracle database and some in text files. I'm using the 'digest' command on Solaris 10 OS and an Oracle function to encode the data in the database. However, as a test, when i try to encode the same string in the dataabse ans OS, I get... (4 Replies)
Discussion started by: zaff
4 Replies

5. 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

6. Shell Programming and Scripting

Help with MD5 script

Hi, I tried to write script, which would be able to generate MD5 sums into txt file.. But It won't work.. (I've been trying to fix that over 4 hours, but nothing helps) Here it is #!/bin/bash FILE="nothing1" POST="nothing2" I=1 while do FILE=`ls -ltR | grep "^-" | tr -s "... (1 Reply)
Discussion started by: TheBarnacle
1 Replies

7. Solaris

md5 checksum what does it do

Hello good people, I came across md5 checksum. Can anyone please explain to me what it does and if possible an example of how to use it? Thank you very much (1 Reply)
Discussion started by: cjashu
1 Replies

8. Shell Programming and Scripting

Using Wget with Digest Authentication

I’m trying to use wget 1.13.4 from a command line to access a web page using Digest Authentication on a Tomcat server, and I keep getting HTTP/1.1 401 Unauthorized response. Below is my code and the response. Any suggestions would be appreciated. wget --debug --server-response --user-agent=""... (5 Replies)
Discussion started by: mtarkowski
5 Replies

9. Red Hat

Digest::md5 needed for RHEL 6.4

Hey, I've got a package that requires 'Digest:md5' to be installed but I can't locate a source for it from Redhat. Poking around on the internet I found some stuff that seemed to be for RHEL 6.4 but when I had yum try a local install it gives me this error. Transaction Check Error: file... (3 Replies)
Discussion started by: DustinT
3 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
File(3pm)						User Contributed Perl Documentation						 File(3pm)

NAME
Digest::MD5::File - Perl extension for getting MD5 sums for files and urls. SYNOPSIS
use Digest::MD5::File qw(dir_md5_hex file_md5_hex url_md5_hex); my $md5 = Digest::MD5->new; $md5->addpath('/path/to/file'); my $digest = $md5->hexdigest; my $digest = file_md5($file); my $digest = file_md5_hex($file); my $digest = file_md5_base64($file); my $md5 = Digest::MD5->new; $md5->addurl('http://www.tmbg.com/tour.html'); my $digest = $md5->hexdigest; my $digest = url_md5($url); my $digest = url_md5_hex($url); my $digest = url_md5_base64($url); my $md5 = Digest::MD5->new; $md5->adddir('/directory'); my $digest = $md5->hexdigest; my $dir_hashref = dir_md5($dir); my $dir_hashref = dir_md5_hex($dir); my $dir_hashref = dir_md5_base64($dir); DESCRIPTION
Get MD5 sums for files of a given path or content of a given url. EXPORT
None by default. You can export any file_* dir_*, or url_* function and anything Digest::MD5 can export. use Digest::MD5::File qw(md5 md5_hex md5_base64); # 3 Digest::MD5 functions print md5_hex('abc123'), " "; print md5_base64('abc123'), " "; OBJECT METHODS
addpath() my $md5 = Digest::MD5->new; $md5->addpath('/path/to/file.txt') or die "file.txt is not where you said: $!"; or you can add multiple files by specifying an array ref of files: $md5->addpath(@files); adddir() addpath()s each file in a directory recursively. Follows the same rules as the dir_* functions. my $md5 = Digest::MD5->new; $md5->adddir('/home/tmbg/') or die "See warning above to see why I bailed: $!"; addurl() my $md5 = Digest::MD5->new; $md5->addurl('http://www.tmbg.com/tour.html') or die "They Must Be not on tour"; file_* functions Get the digest in variouse formats of $file. If file does not exist or is a directory it croaks (See NOFATALS for more info) my $digest = file_md5($file) or warn "$file failed: $!"; my $digest = file_md5_hex($file) or warn "$file failed: $!"; my $digest = file_md5_base64($file) or warn "$file failed: $!"; dir_* functions Returns a hashref whose keys are files relative to the given path and the values are the MD5 sum of the file or and empty string if a directory. It recurses through the entire depth of the directory. Symlinks to files are just addpath()d and symlinks to directories are followed. my $dir_hashref = dir_md5($dir) or warn "$dir failed: $!"; my $dir_hashref = dir_md5_hex($dir) or warn "$dir failed: $!"; my $dir_hashref = dir_md5_base64($dir) or warn "$dir failed: $!"; url_* functions Get the digest in various formats of the content at $url (Including, if $url points to directory, the directory listing content). Returns undef if url fails (IE if LWP::UserAgent's $res->is_success is false) my $digest = url_md5($url) or warn "$url failed"; my $digest = url_md5_hex($url) or warn "$url failed"; my $digest = url_md5_base64($url) or warn "$url failed"; SPECIAL SETTINGS
BINMODE By default files are opened in binmode. If you do not want to do this you can unset it a variety of ways: use Digest::MD5::File qw(-nobin); or $Digest::MD5::File::BINMODE = 0; or at the function/method level by specifying its value as the second argument: $md5->addpath($file,0); my $digest = file_md5_hex($file,0); UTF8 In some cases you may want to have your data utf8 encoded, you can do this the following ways: use Digest::MD5::File qw(-utf8); or $Digest::MD5::File::UTF8 = 1; or at the function/method level by specifying its value as the third argument for files and second for urls: $md5->addpath($file,$binmode,1); my $digest = file_md5_hex($file,$binmode,1); $md5->addurl($url,1); url_md5_hex($url,1); It use's Encode's encode_utf8() function to do the encoding. So if you do not have Encode (pre 5.7.3) this won't work :) NOFATALS Instead of croaking it will return undef if you set NOFATALS to true. You can do this two ways: $Digest::MD5::File::NOFATALS = 1; or the -nofatals flag: use Digest::MD5::File qw(-nofatals); my $digest = file_md5_hex($file) or die "$file failed"; $! is not set so its not really helpful if you die(). SEE ALSO
Digest::MD5, Encode, LWP::UserAgent AUTHOR
Daniel Muey, <http://drmuey.com/cpan_contact.pl> COPYRIGHT AND LICENSE
Copyright 2005 by Daniel Muey This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-04-04 File(3pm)
All times are GMT -4. The time now is 06:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy