Added NSEC3 hash generation and error handling for the UNPACK function