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
4,071
questions
1095
votes
34
answers
1.2m
views
How can I generate an MD5 hash in Java?
Is there any method to generate MD5 hash of a string in Java?
573
votes
22
answers
513k
views
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?
472
votes
9
answers
453k
views
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).
417
votes
7
answers
425k
views
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 ...
394
votes
10
answers
498k
views
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: ...
315
votes
22
answers
529k
views
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.
291
votes
24
answers
596k
views
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 ...
214
votes
13
answers
156k
views
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 ...
211
votes
21
answers
374k
views
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[] ...
200
votes
5
answers
264k
views
Simple (non-secure) hash function for JavaScript? [duplicate]
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) ...
198
votes
9
answers
231k
views
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 ...
195
votes
1
answer
14k
views
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 ...
190
votes
9
answers
270k
views
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?
171
votes
28
answers
208k
views
In Java, how do I convert a byte array to a string of hex digits while keeping leading zeros? [duplicate]
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 ...
170
votes
4
answers
319k
views
How do I calculate the MD5 checksum of a file in Python? [duplicate]
I have written some code in Python that checks for an MD5 hash in a file and makes sure the hash matches that of the original.
Here is what I have developed:
# Defines filename
filename = "file....
168
votes
8
answers
111k
views
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 ...
162
votes
9
answers
72k
views
Is MD5 still good enough to uniquely identify files?
Is MD5 hashing a file still considered a good enough method to uniquely identify it given all the breaking of MD5 algorithm and security issues etc? Security is not my primary concern here, but ...
150
votes
7
answers
136k
views
Is calculating an MD5 hash less CPU intensive than SHA family functions?
Is calculating an MD5 hash less CPU intensive than SHA-1 or SHA-2 on "standard" laptop x86 hardware? I'm interested in general information, not specific to a certain chip.
UPDATE:
In my case, I'm ...
148
votes
19
answers
124k
views
How can I convert a String to an MD5 hash in iOS using Swift?
I want to convert a string like "abc" to an MD5 hash. I want to do this in iOS and Swift. I have tried using the solutions below but they were not working for me:
Importing CommonCrypto in a Swift ...
146
votes
10
answers
150k
views
Random hash in Python
What is the easiest way to generate a random hash (MD5) in Python?
140
votes
14
answers
75k
views
PHP best way to MD5 multi-dimensional array?
What is the best way to generate an MD5 (or any other hash) of a multi-dimensional array?
I could easily write a loop which would traverse through each level of the array, concatenating each value ...
136
votes
11
answers
165k
views
SHA1 vs md5 vs SHA256: which to use for a PHP login?
I'm making a php login, and I'm trying to decide whether to use SHA1 or Md5, or SHA256 which I read about in another stackoverflow article. Are any of them more secure than others? For SHA1/256, do I ...
134
votes
5
answers
67k
views
MD5 algorithm in Objective-C
How to calculate the MD5 in Objective-C?
133
votes
9
answers
150k
views
MD5 is 128 bits but why is it 32 characters?
I read some docs about md5, it said that its 128 bits, but why is it 32 characters? I can't compute the characters.
1 byte is 8 bits
if 1 character is 1 byte
then 128 bits is 128/8 = 16 bytes right?
...
125
votes
14
answers
189k
views
How to calculate md5 hash of a file using javascript
Is there a way to calculate the MD5 hash of a file before the upload to the server using Javascript?
121
votes
7
answers
22k
views
Is there an MD5 Fixed Point where md5(x) == x?
Is there a fixed point in the MD5 transformation, i.e. does there exist x such that md5(x) == x?
118
votes
7
answers
169k
views
SHA-256 or MD5 for file integrity
I know that SHA-256 is favored over MD5 for security, etc., but, if I am to use a method to only check file integrity (that is, nothing to do with password encryption, etc.), is there any advantage of ...
116
votes
12
answers
454k
views
How to generate an MD5 hash from a string in JavaScript/Node.js?
How to generate a MD5 hash using Javascript/Node.js? I already have a fileVideo string and I need to generate a MD5 hash for the string.
var fileVideo = "my string";
string md5 = ...
112
votes
13
answers
88k
views
How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?
As I want to use Google maps in my application, I need the debug certificates' MD5 fingerprint. I tried following.:
(Here I copied the debug.keystore file from C:\Documents and Settings\...
107
votes
12
answers
103k
views
Can two different strings generate the same MD5 hash code?
For each of our binary assets we generate a MD5 hash. This is used to check whether a certain binary asset is already in our application. But is it possible that two different binary assets generate ...
104
votes
16
answers
41k
views
How come MD5 hash values are not reversible?
One concept I've always wondered about is the use of cryptographic hash functions and values. I understand that these functions can generate a hash value that is unique and virtually impossible to ...
104
votes
7
answers
134k
views
How to get a MD5 hash from a string in Golang?
This is how I started to get a md5 hash from a string:
import "crypto/md5"
var original = "my string comes here"
var hash = md5.New(original)
But obviously this is not how it works. Can someone ...
99
votes
16
answers
172k
views
MD5 hashing in Android
I have a simple android client which needs to 'talk' to a simple C# HTTP listener. I want to provide a basic level of authentication by passing username/password in POST requests.
MD5 hashing is ...
96
votes
8
answers
140k
views
AmazonS3 putObject with InputStream length example
I am uploading a file to S3 using Java - this is what I got so far:
AmazonS3 s3 = new AmazonS3Client(new BasicAWSCredentials("XX","YY"));
List<Bucket> buckets = s3.listBuckets();
s3.putObject(...
93
votes
8
answers
99k
views
Converting a md5 hash byte array to a string
How can I convert the hashed result, which is a byte array, to a string?
byte[] bytePassword = Encoding.UTF8.GetBytes(password);
using (MD5 md5 = MD5.Create())
{
byte[] byteHashedPassword = md5....
84
votes
1
answer
67k
views
RoR - MD5 generation
How can I encrypt a string with MD5 in Rails 3.0 ?
pass = MD5.hexdigest(pass) in a model yields uninitialized constant MyModel::MD5
81
votes
8
answers
258k
views
MD5 hash from file in C++
How to get the MD5 hash of a file in C++?
79
votes
6
answers
554k
views
encrypt and decrypt md5
I am using code $enrypt=md5($pass) and inserting $encrypt to database. I want to find out a way to decrypt them. I tried using a decrypting software but it says the hash should be of exactly 16 bytes....
78
votes
3
answers
71k
views
Security & Authentication: SSL vs SASL
My understanding is that SSL combines an encryption algorithm (like AES, DES, etc.) with a key exchange method (like Diffie-Hellman) to provide secure encryption and identification services between ...
75
votes
3
answers
7k
views
Is it possible to access the compressed data before decompression in HttpClient?
I'm working on the Google Cloud Storage .NET client
library. There are three features (between .NET, my client
library, and the Storage service) that are combining in an
unpleasant way:
When ...
74
votes
8
answers
68k
views
How are hash functions like MD5 unique?
I'm aware that MD5 has had some collisions but this is more of a high-level question about hashing functions.
If MD5 hashes any arbitrary string into a 32-digit hex value, then according to the ...
73
votes
16
answers
95k
views
How to generate an MD5 checksum for a file in Android?
In my app I have a requirement to generate an MD5 checksum for a file. Could you please tell me if there is any way in which this can be achieved?
Thank you.
73
votes
9
answers
125k
views
What is the best way to create a random hash/string?
What is the best way of generating a hash for the purpose of storing a session? I am looking for a lightweight, portable solution.
67
votes
7
answers
67k
views
What is currently the most secure one-way encryption algorithm?
As many will know, one-way encryption is a handy way to encrypt user passwords in databases. That way, even the administrator of the database cannot know a user's password, but will have to take a ...
63
votes
2
answers
50k
views
What checksum algorithm should I use?
I'm building a system which needs to be able to find if blobs of bytes have been updated.
Rather than storing the whole blob (they can be up to 5MBs), I'm thinking I should compute a checksum of it, ...
61
votes
8
answers
45k
views
Computing an md5 hash of a data structure
I want to compute an md5 hash not of a string, but of an entire data structure. I understand the mechanics of a way to do this (dispatch on the type of the value, canonicalize dictionary key order ...
60
votes
3
answers
26k
views
What's the shortest pair of strings that causes an MD5 collision?
Up to what string length is it possible to use MD5 as a hash without having to worry about the possibility of a collision?
This would presumably be calculated by generating an MD5 hash for every ...
55
votes
17
answers
14k
views
What is the best "forgot my password" method? [duplicate]
Possible Duplicate:
Forgot Password: what is the best method of implementing a forgot password function?
I'm programming a community website.
I want to build a "forgot my password" feature.
...
54
votes
4
answers
48k
views
Google Maps API for Android, getting SHA1 cert instead of MD5
When I try to get the MD5 fingerprint using keytool, I get a SHA1 fingerprint instead and the Google Maps doesn't recognize it. How do I get the MD5 fingerprint?
53
votes
2
answers
61k
views
Check if string is an MD5 Hash
I accidentally stopped hashing passwords before they were stored, so now my database has a mix of MD5 Passwords and unhashed passwords.
I want to loop through and hash the ones that are not MD5. Is ...