digest before extension and not after
Merge pull request #1 from CodingFu/patch-1

digest before extension and not after