I stand corrected: encrypted PDFs are indexed unless a password is set. However, in the past they were unable to do so[0]: "Generally we can index textual content (written in any language) from PDF files that use various kinds of character encodings, provided they're not password protected or encrypted."
[0] https://developers.google.com/search/blog/2011/09/pdfs-in-go...