1 31 32 package org.pdfbox.pdmodel.encryption; 33 34 45 public abstract class ProtectionPolicy 46 { 47 48 private static final int DEFAULT_KEY_LENGTH = 40; 49 50 private int encryptionKeyLength = DEFAULT_KEY_LENGTH; 51 52 60 public void setEncryptionKeyLength(int l) 61 { 62 if(l!=40 && l!=128) 63 { 64 throw new RuntimeException ("Invalid key length"); 65 } 66 encryptionKeyLength = l; 67 } 68 69 75 public int getEncryptionKeyLength() 76 { 77 return encryptionKeyLength; 78 } 79 } 80 | Popular Tags |