The main limitation with the SAS MD5 hash function (and SHA256) is the 32K data length limit. This doesn’t allow the creation of a hash for, say, a large file which is consistent with externally MD5 generated hashes, although an internally usable hash is easy enough to generate with chaining.
I am suggesting an extension to the hashing functions that saves the internal state between calls and resumes the hash process with further data.
For example:
* running hash of 'part1', initalise state ;
hash = md5('part1',internal_state_id1,'i');
* running hash of 'part1part2' ;
hash = md5('part2',internal_state_id1);
* final hash value of 'part1part2part3' ;
hash = md5('part3',internal_state_id1);