Just use md5sum with no options:

echo 'String' | md5sum