Fix argument order.
Debug output and fix sha1 and sha2 method.
Use QSharedPointer again.