Use simpler digest methods. Thanks Terrence. [ci skip]

No idea why the other code was written like that.