def validate_cmd_response_nonce(got, used):
if used == '<STR_LIT>'.decode('<STR_LIT>'):<EOL><INDENT>if got == used:<EOL><INDENT>raise(pyhsm.exception.YHSM_Error("<STR_LIT>"% (got.encode('<STR_LIT>'))))<EOL><DEDENT>return got<EOL><DEDENT>return validate_cmd_response_str('<STR_LIT>', got, used)<EOL>
Check that the returned nonce matches nonce used in request.

A request nonce of 000000000000 means the HSM should generate a nonce internally though,
so if 'used' is all zeros we actually check that 'got' does NOT match 'used'.