Added backend check to hash primitives
Style nitpick
Merge pull request #804 from Ayrx/add-backend-check-to-hashes

Added backend check to hash primitives