md5

Another ID generation queston

I'm trying to generate unique IDs for use in a Google App Engine application and would like feedback on the feasibility of the approach I'm thinking of using (questions at the end). I've read quite a few questions on this topic, but I don't remember coming across this particular approach. I'd like random-looking IDs, e.g., MD5 hashes, ...

php md5 algorithm that gives same result as c#

Hello, i have a hashing algorithm in C#, in a nutshell, it is: string input = "asd"; System.Security.Cryptography.MD5 alg = System.Security.Cryptography.MD5.Create(); System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); byte[] hash = alg.ComputeHash(enc.GetBytes(input)); string output = Convert.ToBase64String(hash); // out...

Javascript equivalent for PHP's md5() which will also work with multibyte strings?

EDIT: the script mentioned in the question, and the other script pointed among the answers, both work just fine with multibyte strings - turned out my problem was elsewhere. Does anyone know of such implementation? The script at http://phpjs.org/functions/view/469 works well, just not on multibyte strings. ...

Does any published research indicate that preimage attacks on MD5 are imminent?

I keep on reading on SO that MD5 is broken, bust, obsolete and never to be used. That angers me. The fact is that collision attacks on MD5 are now fairly easy. Some people have collision attacks down to an art and can even us use them to predict elections. I find most of the examples MD5 "brokeness" less interesting. Even the famous C...

C# MD5 hasher example

Edit: I've retitled this to an example as the code works as expected. I am trying to copy a file, get a MD5 hash, then delete the copy. I am doing this to avoid process locks on the original file, which another app writes to. However, I am getting a lock on the file I've copied. File.Copy(pathSrc, pathDest, true); String md5Result; ...

Given filename, how can I get the Adler32 using Crypto++

Given a "string filename", how can I get the Adler32 checksum using the C++ Crypto++ library. I am a little confused about using their FileSource and Sink system. Below I have the skeleton of the code that does MD5, but I can't seem to find any examples or tutorials on the Adler32 usage. string filename = "/tmp/data.txt" string file_ad...

Gravatar for Iphone? How do I generate a hexadecimal MD5 hash?

I'd like to use gravatar in my iPhone application. Is there anyway to generate a hexadecimal MD5 hash in Objective-C for iPhone? Using openssl on iPhone is a no-go. ...

How do I calculate the likelyhood of a collision using md5?

I have keys that can vary in length between 1 and 256 characters*; how can I calculate the probability that any two keys will collide when using md5 (baring a brute force solution of trying each key)? * the character set is restricted to [a-z.-] ...

Are the first 32 bits of an md5 hash just as "random" as any other substring?

I'm looking to create a 32-bit hash of some data objects. Since I don't feel like writing my own hash function and md5 is available, my current approach is to use the first 32 bits (i.e. first 8 hex digits) from an md5 hash. Is this acceptable? In other words, are the first 32 bits of an md5 hash just as "random" as any other substrin...

How do I assess the hash collision probability?

I'm developing a back-end application for a search system. The search system copies files to a temporary directory and gives them random names. Then it passes the temporary files' names to my application. My application must process each file within a limited period of time, otherwise it is shut down - that's a watchdog-like security mea...

Salting a C# MD5 ComputeHash on a stream

I can't see any way to salt a MD5.ComputeHash(Stream). Am I missing some way of injecting bytes into the HashAlgorithm? I tried performing a ComputeHash(byte[]) before performing the stream compute, but, unsurprisingly, it had no effect. Any ideas (apart from modifying the file)? Thanks for your time. addendum Just to be a little mor...

What is the best "forgot my password" method?

I'm programming a community website. I want to build a "forgot my password" feature. Looking around at different sites, I've found they employ one of three options: send the user an email with a link to a unique, hidden URL that allows him to change his password (Gmail and Amazon) send the user an email with a new, randomly generated...

Can I get the MD5sum of a directory with Perl?

I am writing a Perl script (in Windows) that is using File::Find to index a network file system. It works great, but it takes a very long time to crawl the file system. I was thinking it would be nice to somehow get a checksum of a directory before traversing it, and it the checksum matches the checksum that was taken on a previous run...

Fun with md5 - digests of digests

Two questions actually: 1) Does there exist a 128-bit number whose md5 hash is itself? X == md5(X) - does 'X' exist and can it be found without brute force? 2) Does there exist two 128-bit md5 digests that hash to each other? Y == md5(X) && X == md5(Y) - do 'X' and 'Y' exist and can they be found without brute force? Related: ...

Is there a way to access an Image's bitmap data using Javascript?

I am looking for a way to create a hash for an image displayed on an XHTML page using Javascript. ...

Random hash in Python

What is the easiest way to generate a random hash (MD5) in Python? ...

Dealing with a varbinary field in VB.NET

A partner of ours is making a call to a web service that includes a parameter called token. Token is the result of an MD5 hash of two numbers, and helps us authenticate that the user using our partners system. Our partner asks the user for two strings, concatenates them, runs them through MD5, and then calls our web service. The result...

hash collision and appending data

Assume I have two strings (or byte arrays) A and B which both have the same hash (with hash I mean things like MD5 or SHA1). If I concatenate another string behind it, will A+C and B+C have the same hash H' as well? What happens to C+A and C+B? I tested it with MD5 and in all my tests, appending something to the end made the hash the sa...

How does MD5Sum algorithm work?

Md5sum is used to check integrity of iso image of say ubuntu.How does it work? ...

Is this acceptable for passing a password?

I have a website that requires a user to authenticate themselves with a user name and password. I would like to use SSL, but I don't have an SSL certificate. But I do something else that I think is okay. My site is primarily AJAX based and requires JavaScript, otherwise nothing will work. When the user tries to login, I query the data...