I've been looking at contrib/pgcrypto but it hasn't any information about md5 encryption
Sure it does. See README.pgcrypto:
"SQL FUNCTIONS =============
If any of arguments are NULL they return NULL.
digest(data::bytea, type::text)::bytea
Type is here the algorithm to use. E.g. 'md5', 'sha1', ... Returns binary hash."
Joe
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend