Questions tagged [md5]

Cryptographic hash function with a 128-bit (16-byte) hash value. MD5 is no longer considered a secure hash and should not be used to protect sensitive information like passwords

MD5 is incredibly weak on modern computers, and can be easily broken. If you are looking to securely hash values, consider something stronger like bcrypt

MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function with a 128-bit (16-byte) hash value. Specified in RFC 1321, MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of files. However, it has been shown that MD5 is not collision resistant; as such, MD5 is not suitable for applications like SSL certificates or digital signatures that rely on this property. An MD5 hash is typically expressed as a 32-digit hexadecimal number.

References:

4054 questions
1090
votes
34 answers

How can I generate an MD5 hash in Java?

Is there any method to generate MD5 hash of a string in Java?
Akshay
  • 11,803
  • 5
  • 29
  • 26
568
votes
22 answers

Getting a File's MD5 Checksum in Java

I am looking to use Java to get the MD5 checksum of a file. I was really surprised but I haven't been able to find anything that shows how to get the MD5 checksum of a file. How is it done?
Jack
  • 20,735
  • 11
  • 48
  • 48
464
votes
9 answers

Generating an MD5 checksum of a file

Is there any simple way of generating (and checking) MD5 checksums of a list of files in Python? (I have a small program I'm working on, and I'd like to confirm the checksums of the files).
Alexander
  • 5,661
  • 6
  • 24
  • 19
404
votes
7 answers

Calculate MD5 checksum for a file

I'm using iTextSharp to read the text from a PDF file. However, there are times I cannot extract text, because the PDF file is only containing images. I download the same PDF files everyday, and I want to see if the PDF has been modified. If the…
broke
  • 8,032
  • 16
  • 54
  • 83
384
votes
10 answers

How to get MD5 sum of a string using python?

In the Flickr API docs, you need to find the MD5 sum of a string to generate the [api_sig] value. How does one go about generating an MD5 sum from a string? Flickr's example: string:…
super9
  • 29,181
  • 39
  • 119
  • 172
312
votes
21 answers

fastest MD5 Implementation in JavaScript

There are many MD5 JavaScript implementations out there. Does anybody know which one is the most advanced, most bugfixed and fastest? I need it for this tool.
powtac
  • 40,542
  • 28
  • 115
  • 170
289
votes
24 answers

Is it possible to decrypt MD5 hashes?

Someone told me that he has seen software systems that: retrieve MD5 encrypted passwords from other systems; decrypt the encrypted passwords and store the passwords in the database of the system using the systems own algorithm. Is that possible? I…
John B
  • 20,062
  • 35
  • 120
  • 170
210
votes
13 answers

Get the MD5 hash of big files in Python

I have used hashlib (which replaces md5 in Python 2.6/3.0), and it worked fine if I opened a file and put its content in the hashlib.md5() function. The problem is with very big files that their sizes could exceed the RAM size. How can I get the MD5…
JustRegisterMe
  • 2,147
  • 3
  • 15
  • 7
209
votes
21 answers

Calculate a MD5 hash from a string

I use the following C# code to calculate a MD5 hash from a string. It works well and generates a 32-character hex string like this: 900150983cd24fb0d6963f7d28e17f72 string sSourceData; byte[] tmpSource; byte[] tmpHash; sSourceData =…
Muhamad Jafarnejad
  • 2,521
  • 4
  • 21
  • 34
195
votes
1 answer

Different results with Java's digest versus external utilities

I have written a simple Java class to generate the hash values of the Windows Calculator file. I am using Windows 7 Professional with SP1. I have tried Java 6.0.29 and Java 7.0.03. Can someone tell me why I am getting different hash values from…
Mike Viens
  • 2,467
  • 3
  • 19
  • 23
194
votes
5 answers

Simple (non-secure) hash function for JavaScript?

Possible Duplicate: Generate a Hash from string in Javascript/jQuery Can anyone suggest a simple (i.e. tens of lines of code, not hundreds of lines) hash function written in (browser-compatible) JavaScript? Ideally I'd like something that, when…
mjs
  • 63,493
  • 27
  • 91
  • 122
188
votes
9 answers

Maximum length for MD5 input/output

What is the maximum length of the string that can have md5 hashed? Or: If it has no limit, and if so what will be the max length of the md5 output value?
Arun David
  • 2,714
  • 3
  • 18
  • 18
182
votes
9 answers

Hashing a file in Python

I want python to read to the EOF so I can get an appropriate hash, whether it is sha1 or md5. Please help. Here is what I have so far: import hashlib inputFile = raw_input("Enter the name of the file:") openedFile = open(inputFile) readFile =…
user3358300
  • 1,919
  • 2
  • 13
  • 6
171
votes
28 answers

In Java, how do I convert a byte array to a string of hex digits while keeping leading zeros?

I'm working with some example java code for making md5 hashes. One part converts the results from bytes to a string of hex digits: byte messageDigest[] = algorithm.digest(); StringBuffer hexString = new StringBuffer(); for (int…
Eugene M
  • 47,557
  • 14
  • 38
  • 44
168
votes
8 answers

How many random elements before MD5 produces collisions?

I've got an image library on Amazon S3. For each image, I md5 the source URL on my server plus a timestamp to get a unique filename. Since S3 can't have subdirectories, I need to store all of these images in a single flat folder. Do I need to worry…
Ben Throop
  • 4,772
  • 5
  • 23
  • 20
1
2 3
99 100