PDF4Java Reference Documentation
com.o2sol.pdf4java.core.security Package / PDFAesSecurityHandler Class / setKeySize Method
The size, in bits, of the secret key used by the security handler.
Collapse All Expand All
In This Topic

setKeySize Method
In This Topic
Sets the size, in bits, of the secret key used by the security handler.
AES support only 128bit and 256bit key sizes.
Syntax

    public void setKeySize(
       int keySize
    )

#### Parameters

keySize
  The size, in bits, of the secret key used by the security handler.

Exceptions

Exception | Description
--- | ---
java.lang.IllegalArgumentException | Whne key size is different from 128 and 256.

See Also

#### Reference

PDFAesSecurityHandler Class
PDFAesSecurityHandler Members

© 2025 O2 Solutions All Rights Reserved.

Send comments on this topic.