docs: def set_password(ctx, new_password, remember):
      """
      Password protect the OATH credentials.
  
      Allows you to set a password that will be required to access the OATH
      credentials stored on your YubiKey.
      """
      ensure_validated(ctx, prompt='Enter your current password')
      if not new_password:
          new_password = click.prompt(
              'Enter your new password',
              hide_input=True,
              confirmation_prompt=True,
              err=True)
  
      controller = ctx.obj['controller']
      settings = ctx.obj['settings']
      keys = settings.setdefault('keys', {})
      key = controller.set_password(new_password)
      click.echo('Password updated.')
      if remember:
          keys[controller.id] = b2a_hex(key).decode()
          settings.write()
          click.echo('Password remembered')
      elif controller.id in keys:
          del keys[controller.id]
          settings.write()