- // Generate a file key. The <fileKey> buffer must have space for
- // at least 16 bytes. Checks user key and returns gTrue if okay.
- // <userPassword> may be NULL.
- static GBool makeFileKey(GString *ownerKey, GString *userKey,
+ // Generate a file key. The <fileKey> buffer must have space for at
+ // least 16 bytes. Checks <ownerPassword> and then <userPassword>
+ // and returns true if either is correct. Sets <ownerPasswordOk> if
+ // the owner password was correct. Either or both of the passwords
+ // may be NULL, which is treated as an empty string.
+ static GBool makeFileKey(int encVersion, int encRevision, int keyLength,
+ GString *ownerKey, GString *userKey,