Example usage for com.itextpdf.text.pdf PdfWriter STANDARD_ENCRYPTION_40

List of usage examples for com.itextpdf.text.pdf PdfWriter STANDARD_ENCRYPTION_40

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfWriter STANDARD_ENCRYPTION_40.

Prototype

int STANDARD_ENCRYPTION_40

To view the source code for com.itextpdf.text.pdf PdfWriter STANDARD_ENCRYPTION_40.

Click Source Link

Document

Type of encryption

Usage

From source file:org.sejda.impl.itext5.util.EncryptionUtils.java

License:Open Source License

/**
 * Mapping between Sejda and iText encryption algorithms
 * //from  ww w.j a v a 2  s  .  c  om
 * @param encryption
 * @return the iText encryption constant
 */
public static int getEncryptionAlgorithm(PdfEncryption encryption) {
    switch (encryption) {
    case AES_ENC_128:
        return PdfWriter.ENCRYPTION_AES_128;
    case STANDARD_ENC_128:
        return PdfWriter.STANDARD_ENCRYPTION_128;
    default:
        return PdfWriter.STANDARD_ENCRYPTION_40;
    }
}