How to do MD5

Bengt Kleberg bengt.kleberg@REDACTED
Tue Dec 20 07:16:13 CET 2005


On 2005-12-20 02:54, Jing Ding wrote:
> 
> I am a beginner in Erlang. So please bear with me.

if you want to you could read up a little on erlang. we have a FAQ:
http://www.erlang.org/faq/t1.html

Getting Started With Erlang:
http://www.erlang.se/doc/doc-5.4.10/doc/getting_started/part_frame.html

he book Concurrent Programming in Erlang, ISBN 0-13-285792-8, 2nd 
edition. The first part of the book is available
http://www.erlang.org/download/erlang-book-part1.pdf


> I think there is BIF md5("hi"). But do I need to include any header 
> file, or install any patches? Also what is the equivalent of "print" 
> statement in Erlang? I need it for debugging.

the md5 function is available in the crypto module:
http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/crypto.3

no header, nor patch, necessary.

to ''print'' you can use fwrite() in the io module:
http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/io.3


for debugging without the source it could be simpler to use the dbg module:
http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/dbg.3


bengt



More information about the erlang-questions mailing list