Hash code

Hi! All!..
I’ve got a question:
I want to build a front-end for http://www.opensubtitles.com/ in rails and one of the first problem is to build hash code. The examples of the page are in other language but not in ruby, take a look: http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes

Do you know how to build this hash code with ruby??