How do I detect is a PDF is encrypted using AES?

Q: We are looking for a way to detect if a PDF has AES security
applied to it, and at what bitstrength. We noticed in the PDFNet
documentation there is a SecurityHandler.IsAES() function, as well as
an overloaded version that accepts an Obj as a parameter (although the
version without parameters does not appear to actually exist in .NET
version). Should we be doing something like the following?

StdSecurityHandler x = new StdSecurityHandler(pdf.GetSecurityHandler
bool isAes = x.IsAES(null);
int bitStrength = x.GetKeyLength() * 8;
A: Yes, you can use the above code to detect if a PDF has AES
security. As part of the next PDFNet update we will add a separate
overload with a default 'null' paramater. Thank you.