DecryptedStatePKI.java
2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.cos.CosDictionary
* com.adobe.internal.pdftoolkit.core.cos.CosDocument
* com.adobe.internal.pdftoolkit.core.cos.CosEncryption
* com.adobe.internal.pdftoolkit.core.exceptions.PDFCosParseException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException
* com.adobe.internal.pdftoolkit.core.securityframework.DecryptedState
* com.adobe.internal.pdftoolkit.core.securityframework.SecurityManager
*/
package com.adobe.internal.pdftoolkit.core.encryption;
import com.adobe.internal.pdftoolkit.core.cos.CosDictionary;
import com.adobe.internal.pdftoolkit.core.cos.CosDocument;
import com.adobe.internal.pdftoolkit.core.cos.CosEncryption;
import com.adobe.internal.pdftoolkit.core.encryption.StandardCipherSecurityManager;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFCosParseException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException;
import com.adobe.internal.pdftoolkit.core.securityframework.DecryptedState;
import com.adobe.internal.pdftoolkit.core.securityframework.SecurityManager;
import java.util.HashMap;
import java.util.Map;
public class DecryptedStatePKI
implements DecryptedState {
private HashMap<String, byte[]> cryptFilterEncryptKeyMap = new HashMap();
private static final long serialVersionUID = -7117026973528299629L;
private byte[] encryptKey;
private Integer perms;
public byte[] getEncryptKey() {
return this.encryptKey;
}
public void setEncryptKey(byte[] encryptKey) {
this.encryptKey = encryptKey;
}
public void setPerms(Integer mPerms) {
this.perms = mPerms;
}
public Integer getPerms() {
return this.perms;
}
public SecurityManager getSecurityManager(CosDocument cosDocument) throws PDFCosParseException, PDFIOException, PDFSecurityException {
Map params = (Map)cosDocument.getEncryption().getEncryption().getValue();
return StandardCipherSecurityManager.newInstance(null, params, null);
}
public byte[] getEncryptKey(String cryptFilter) {
return this.cryptFilterEncryptKeyMap.get(cryptFilter);
}
public void setEncryptKey(String cryptFilter, byte[] encryptKey) {
this.cryptFilterEncryptKeyMap.put(cryptFilter, encryptKey);
}
}