md5sum is not available on macOS be default, however the macos md5 command has a -r flag which duplicates it’s behavious, so a simple:

alias md5sum='md5 -r'

in your ~/.profile or ~/.bashrc is all that is needed.