|
2 | 2 |
|
3 | 3 | import com.itextpdf.basics.Utilities;
|
4 | 4 |
|
| 5 | +import javax.crypto.Cipher; |
| 6 | +import javax.crypto.KeyGenerator; |
| 7 | +import javax.crypto.SecretKey; |
5 | 8 | import java.io.ByteArrayInputStream;
|
6 | 9 | import java.io.ByteArrayOutputStream;
|
7 | 10 | import java.io.IOException;
|
|
16 | 19 | import java.util.ArrayList;
|
17 | 20 | import java.util.List;
|
18 | 21 |
|
19 |
| -import javax.crypto.Cipher; |
20 |
| -import javax.crypto.KeyGenerator; |
21 |
| -import javax.crypto.SecretKey; |
22 |
| - |
23 | 22 | import org.bouncycastle.asn1.ASN1InputStream;
|
24 | 23 | import org.bouncycastle.asn1.ASN1ObjectIdentifier;
|
25 | 24 | import org.bouncycastle.asn1.ASN1Primitive;
|
@@ -85,7 +84,7 @@ public byte[] getEncodedRecipient(int index) throws IOException, GeneralSecurity
|
85 | 84 | Certificate certificate = recipient.getCertificate();
|
86 | 85 | //constants permissions: PdfWriter.AllowCopy | PdfWriter.AllowPrinting | PdfWriter.AllowScreenReaders | PdfWriter.AllowAssembly;
|
87 | 86 | int permission = recipient.getPermission();
|
88 |
| - // NOTE! Added while porting to itext6 |
| 87 | + // NOTE! Added while porting to itext7 |
89 | 88 | // Previous strange code was:
|
90 | 89 | // int revision = 3;
|
91 | 90 | // permission |= revision == 3 ? 0xfffff0c0 : 0xffffffc0;
|
@@ -127,11 +126,11 @@ public PdfArray getEncodedRecipients() throws IOException, GeneralSecurityExcept
|
127 | 126 | EncodedRecipients.add(new PdfLiteral(Utilities.createEscapedString(cms)));
|
128 | 127 | } catch (GeneralSecurityException e) {
|
129 | 128 | EncodedRecipients = null;
|
130 |
| - // break was added while porting to itext6 |
| 129 | + // break was added while porting to itext7 |
131 | 130 | break;
|
132 | 131 | } catch (IOException e) {
|
133 | 132 | EncodedRecipients = null;
|
134 |
| - // break was added while porting to itext6 |
| 133 | + // break was added while porting to itext7 |
135 | 134 | break;
|
136 | 135 | }
|
137 | 136 | }
|
|
0 commit comments