Function mupdf_sys::fz_authenticate_password[][src]

pub unsafe extern "C" fn fz_authenticate_password(
    ctx: *mut fz_context,
    doc: *mut fz_document,
    password: *const c_char
) -> c_int

Test if the given password can decrypt the document.

password: The password string to be checked. Some document specifications do not specify any particular text encoding, so neither do we.

Returns 0 for failure to authenticate, non-zero for success.

For PDF documents, further information can be given by examining the bits in the return code.

Bit 0 => No password required Bit 1 => User password authenticated Bit 2 => Owner password authenticated