
MD5.pir - calculates MD5 checksums

load_bytecode "Digest/MD5.pbc"
$P0 = _md5sum("foo")
_md5_print($P0)
or
load_bytecode "Digest/MD5.pbc"
$P0 = _md5sum("bar")
$S0 = _md5_hex($P0)
or using the Object interface:
load_bytecode "Digest/MD5.pbc"
$P0 = new ["Digest";"MD5"]
$P1 = $P0."md5sum"("baz")
$P0."md5_print"()

This is a pure Parrot MD5 hash routine. You should run it with the JIT core if possible.

Pass in a string, returns an Integer array with the result.
Pass it the Integer array from _md5sum to get the checksum as string.
Pass it the Integer array to print the checksum.

The MD5 class defines the following subroutines, which are very similar to the subroutine alternatives:
md5sum( str )Pass in a string, returns an Integer array with the result, and stores the result in an attribute.
md5_hex( )Uses the Integer array from _md5sum to return the checksum as string.
md5_print( )Uses the Integer array from _md5sum to print the checksum. Returns the checksum as a string.

Still has some limitations on input buffer size, largely due to memory consumption which should be resolved soon.