Modified implementation of MD5 hash generation.