Calculate the md5 hash of the string.

Twine\Str::md5( [ bool $mode = Twine\Config\Md5::DEFAULT ] ) : Twine\Str

Parameters

$mode A md5 mode flag

Available md5 modes

Twine\Config\Md5::DEFAULT Return the hash
Twine\Config\Md5::RAW Return the raw binary of the hash

Examples

$string = new Twine\Str('john pinkerton');

        $string->md5(); // Returns '30cac4703a16a2201ec5cafbd600d803'