md5secret usage

Are there any trick to use md5secret in sip.conf or users.conf for a SIP peer?

I just want to replace my plain text password with the encrypted one.

I found this:
echo -n “MyAccount:asterisk:MyPassword” | md5sum

but authorization doesn’t work with the hash generated

Any suggestions? Thanks!

echo -n “username:password” | md5sum

doesn’t work!

Hrmm… It has worked for me in the past using Asterisk 1.2