Calculate md5 recursively