Merged and added enhancement

Merged hashLoop into createHash and added option to specify hash length