Filter Password Protected Files

This section describes how to filter password-protected non-container files with the C API.

To filter password-protected files

  1. Call the fpInit() function.
  2. Call the fpSetConfig() function with the following arguments:

    Argument Parameter
    nType KVFLT_SETSRCPASSWORD
    nValue The length of the password. To remove a configured password, set this to 0.
    pData The source file password. The password is a null-terminated string with a maximum length of 255 characters (the final byte is null). To remove a configured password, set this to NULL.

    For example:

    (*fpSetConfig)(pKVFilter, KVFLT_SETSRCPASSWORD, 8, "password");
  3. Call the fpFilter() or fpFilterToFile() function.