def validate_pwhash(_self, params):
pwhash, nonce, aead, key_handle = get_pwhash_bits(params)<EOL>d_aead = aead.decode('<STR_LIT>')<EOL>plaintext_len = len(d_aead) - pyhsm.defines.YSM_AEAD_MAC_SIZE<EOL>pw = pwhash.ljust(plaintext_len, chr(<NUM_LIT>))<EOL>if hsm.validate_aead(nonce.decode('<STR_LIT>'), key_handle, d_aead, pw):<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>return "<STR_LIT>"<EOL>
Validate password hash using YubiHSM.