suve

awful: function: md5

Available since rev.36 (v.0.5.0).

Declaration

ascii :md5 ( string $MESSAGE , bool $RAW )
ascii :md5 ( string $MESSAGE )

Summary

Returns a string containing the MD5 checksum of MESSAGE. If RAW is specified and true, the result will be raw binary data. Otherwise, a hexadecimal representation is returned.

Example

# :md5 example
:hex-case s'lower'
:set &hash s'9e107d9d372bb6826bd81d3542a419d6'
:set &calc :md5 s'The quick brown fox jumps over the lazy dog'

!if :eq $calc $hash
    :writeln s'MD5 calculation in awful seems to work fine.'
!else
    :writeln s"lolwut? awful's MD5 function is broken!"
!fi

wikipage modified on 2014/0601/2317