logo       

Re: Primary Key Hash help: msg#01085

lang.ruby.general

Subject: Re: Primary Key Hash help

On Mon, 2002-08-12 at 11:17, Chris Morris wrote:
> Cool - I had inklings of something like this in my head ... but I couldn't
> put it together. I figured someone would be able to pop out an easy answer.
>
> Is the MD5 hash always going to be the same length (it seems that way from
> playing with it)? Will different implementations of MD5 yield the same
> output for the same input?

Yes and yes. MD5 is a standardized specification (thus it will always
have the same output in all implementations, assuming no bugs are
present), and it's size in bits is fixed (forget off the top of my head
what size exactly it is).

>
>
> ----- Original Message -----
> From: "Philipp Meier" <meier@xxxxxxxxxxxxxxx>
> To: "ruby-talk ML" <ruby-talk@xxxxxxxxxxxxx>
> Sent: Monday, August 12, 2002 9:59 AM
> Subject: Re: Primary Key Hash help
>
> Make a hash sum over the data:
>
> require 'md5'
> unique_key = MD5.new(line)
>
> -billy.
>
>






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise