Wrap crypto.hash imports with try/except