md5

(PHP) 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 still use a salt? Also, is this a secure way to store the password as a hash in mysql? function createSalt() { $string = md5(uniqid(...

Truncating an md5 hash, How do I calculate the odds of a collision occuring?

I want to truncate an md5 hash to about half size. How much does that increase the odds of collisions? if I'm dealing with around 500 000 generations, should I be worried about a collision? what about 1m generations. ...

Will using a substring of an MD5 hash like this be unique enough?

What I am trying to do is create a 12 character id for articles on my website similar to how youtube handles their video id (http://www.youtube.com/watch?v=53iddd5IcSU). Right now I am generating an MD5 hash and then grabbing 12 characters of it like this: $ArticleId = substr(MD5("Article".$currentID),10,12) where $currentID is the nu...

Why doesn't md5 match Perl's Digest::MD5 output?

Running the md5 function from the ksh terminal does not matching the output from a simple Perl script. In the terminal I run: echo -n abc | md5 62fecf21103616856d72e6ffc9bcb06b If I run it using Perl: use Digest::MD5 qw(md5_hex); foreach (@ARGV) { print "Digest is ", md5_hex($_), "\n"; } exit I get ./perl_test.sh abc Digest ...

Perl Regular Expressions to match a MD5 Hash?

Recently programming in PHP, I thought I had a working Perl regular expression but when I checked it against what I wanted, it didn't work. What is the right expression to check if something is a MD5 has (32 digit hexadecimal of a-z and 0-9). Currently, I have /^[a-z0-9]{32}$/i ...

Best way to create a random hash

What is the best way of making a md5 hash for the purpose of storing a session? Also, I am looking for one that works with PHP and works without many extensions added because I want my code to be portable. Also, I have heard of the word nonce, but how do I really use a nonce? ...

Is SHA sufficient for checking file duplication? (sha1_file in PHP)

Suppose you wanted to make a file hosting site for people to upload their files and send a link to their friends to retrieve it later and you want to insure files are duplicated where we store them, is PHP's sha1_file good enough for the task? Is there any reason to not use md5_file instead? For the frontend, it'll be obscured using the...

PHP - Get the md5 of remote file?

Is it possible to get the md5 of a file on a remote server? If so how? ...

Best practices for efficiently storing md5 hashes in mysql

Possible field types: BINARY(16) CHAR(32) BIGINT + BIGINT How do I decide which one to use? ...

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 and then compare the result with the encrypted password in the database. This means that ...

Is it safe to store passwords hashed with MD5CryptoServiceProvider in C#?

We are storing hashed passwords in a database table. We prepend each password with a random salt value and hash using MD5CryptoServiceProvider. Is this safe? I have heard MD5 was "broken". If not, can you recommend an alternate hash method to use (specific .NET framework class)? ...

How to get a MD5 hash from a string in Golang?

I'm just starting with Golang and I am now stuck on MD5 creation. 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? ...

Md5 cache keys in Memcache

In this reddit blog post, the author talks about MD5ing the cache keys and hence the reason why they find it very difficult to scale out. Can someone tell me why one would want to md5 cache keys? I didn’t understand the reason even though they explained it as “A few years ago, we decided to md5 all of our cache keys. We did t...

Convert ASP.NET membership system to secure password storage

I have a potential client that set up their website and membership system in ASP.NET 3.5. When their developer set up the system, it seems he turned off the security/hashing aspect of password storage and everything is stored in the clear. Is there a process to reinstall/change the secure password storage of ASP.NET membership without c...

Converting a md5 hash byte array to a string

How can I convert the hashed result, which a byte array, to a string? byte[] bytePassword = Encoding.UTF8.GetBytes(password); using (MD5 md5 = MD5.Create()) { byte[] byteHashedPassword = md5.ComputeHash(bytePassword); } So I need to convert byteHashedPassword to a string ...

Is the result of a md5 hash consistant or server dependent?

I am doing a md5 hash, and just want to make sure the result of: md5.ComputeHash(bytePassword); Is consistent regardless of the server? e.g. windows 2003/2008 and 32/64 bit etc. ...

unique hash of string

Hi, I want to create a unique hash (16 chars long) of an arbitrary length String. Is there a good library that implements MD5 or SHA-1 for C++ with which I can achieve this? (and possibly an example of how to use it) ...

How are hash functions like MD5 unique?

Im 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 there are more unique arbitrary strings than there are unique 32-digit hex values ...

A 16-digit hashing function

Is there a hash function that returns a 16-digit hex value (as MD5 returns 32-digit), or is there a library (for C++) in which I can use MD5 or SHA-1 which returns a 16-digit value ...

Script or Application that will do md5 checking

Is there a program, or a script out there that can compare the md5 checksum of files I tried to create my own, but i'm having problems with any files that have a space in them, so I was wondering if it'd be easier to just use an application. md5deep is something I downloaded that returns the checksum. rm md5mastervalue for i in `ls /me...