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
103
votes
16 answers

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 reverse, but here's what I've always wondered: If on…
barfoon
  • 27,481
  • 26
  • 92
  • 138
101
votes
7 answers

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 provide me a working sample for this?
cringe
  • 13,401
  • 15
  • 69
  • 102
98
votes
16 answers

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 trivial in C# and provides enough security for my…
Squonk
  • 48,735
  • 19
  • 103
  • 135
94
votes
8 answers

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 buckets = s3.listBuckets(); s3.putObject(new PutObjectRequest(buckets.get(0).getName(),…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
92
votes
8 answers

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.ComputeHash(bytePassword); } I need to convert…
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
83
votes
1 answer

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
Mithun Sreedharan
  • 49,883
  • 70
  • 181
  • 236
81
votes
8 answers

MD5 hash from file in C++

How to get the MD5 hash of a file in C++?
user145586
  • 1,057
  • 2
  • 11
  • 14
76
votes
6 answers

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. is there any way to decrypt it or to make it a…
Tomer
  • 801
  • 1
  • 6
  • 5
76
votes
3 answers

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 two endpoints on an un-secure network (like the…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
75
votes
3 answers

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 downloading files (objects in Google Cloud…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
73
votes
16 answers

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.
Ingrid Cooper
  • 1,191
  • 3
  • 16
  • 27
72
votes
8 answers

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 Pigeonhole Principle surely this can not be unique, as…
Aly
  • 15,865
  • 47
  • 119
  • 191
72
votes
9 answers

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.
Eric Gates
  • 897
  • 1
  • 9
  • 7
67
votes
7 answers

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 password guess, encrypt that with the same algorithm…
Teekin
  • 12,581
  • 15
  • 55
  • 67
62
votes
2 answers

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, store this and compute the same checksum a little…
Julien Genestoux
  • 31,046
  • 20
  • 66
  • 93