md5sum and execve

Hello there! Is there a way to use execve() to run md5sum function?
for example execve("md5sum <filename>, NULL,NULL);"
thanx!

I would suggest linking to the md5 libraries and use the API. That would be a much cleaner implementation.

pid = fork();
if( pid == 0){

execl("/bin/sh","sh","/sbin/md5","filename",(char *)NULL);
_exit(127);
}