Part.3 erlang:crc32/erlang:md5

crc32 が erlang モジュールの一つというのがいかにも Erlang っぽい。

Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:2] [async-threads:128] [kernel-poll:true]

Eshell V5.6.5  (abort with ^G)
1> erlang:crc32("hello").
907060870
2> A = erlang:crc32("hello").
907060870
3> erlang:crc32(A, "world").
4192936109
8> erlang:md5([1,2,3]).
<<82,137,223,115,125,245,115,38,252,221,34,89,122,251,31,172>>

ちなみに Python はこんな感じ。

Python 2.6 (trunk:66714:66715M, Oct  1 2008, 18:36:04) 
Type "copyright", "credits" or "license" for more information.
>>> import binascii
>>> binascii.crc32("abc")
891568578
>>> import hashlib
>>> hashlib.new('md5', 'abc').hexdigest()
'900150983cd24fb0d6963f7d28e17f72'