docs: def get_pwhash_bits(params):
      """ Extract bits for password hash validation from params. """
      if not "pwhash" in params or \
              not "nonce" in params or \
              not "aead" in params or \
              not "kh" in params:
          raise Exception("Missing required parameter in request (pwhash, nonce, aead or kh)")
      pwhash = params["pwhash"][0]
      nonce = params["nonce"][0]
      aead = params["aead"][0]
      key_handle = pyhsm.util.key_handle_to_int(params["kh"][0])
      return pwhash, nonce, aead, key_handle