IdentityEncryptionHandler.java
2.33 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
65
66
67
68
69
70
71
72
73
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.io.stream.IO
* com.adobe.internal.io.stream.InputByteStream
* com.adobe.internal.io.stream.OutputByteStream
* com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException
* com.adobe.internal.pdftoolkit.core.securityframework.EncryptionHandler
* com.adobe.internal.pdftoolkit.core.securityframework.EncryptionHandlerState
* com.adobe.internal.pdftoolkit.core.securityframework.SecurityHandler
*/
package com.adobe.internal.pdftoolkit.core.encryption;
import com.adobe.internal.io.stream.IO;
import com.adobe.internal.io.stream.InputByteStream;
import com.adobe.internal.io.stream.OutputByteStream;
import com.adobe.internal.pdftoolkit.core.encryption.IdentityEncryptionHandlerState;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException;
import com.adobe.internal.pdftoolkit.core.securityframework.EncryptionHandler;
import com.adobe.internal.pdftoolkit.core.securityframework.EncryptionHandlerState;
import com.adobe.internal.pdftoolkit.core.securityframework.SecurityHandler;
import java.io.IOException;
public final class IdentityEncryptionHandler
implements EncryptionHandler {
public byte[] encrypt(byte[] content, byte[] key) {
return content;
}
public byte[] decrypt(byte[] content, byte[] key) {
return content;
}
public void encrypt(InputByteStream src, OutputByteStream dest, byte[] key) throws PDFIOException {
try {
IO.copy((InputByteStream)src, (OutputByteStream)dest);
}
catch (IOException e) {
throw new PDFIOException((Throwable)e);
}
}
public void decrypt(InputByteStream src, OutputByteStream dest, byte[] key) throws PDFIOException {
try {
IO.copy((InputByteStream)src, (OutputByteStream)dest);
}
catch (IOException e) {
throw new PDFIOException((Throwable)e);
}
}
public byte[] getBaseEncryptionKey() {
return null;
}
public SecurityHandler getSecurityHandler() {
return null;
}
public String getAlgorithm() {
return "Identity";
}
public String getHandlerName() {
return "";
}
public EncryptionHandlerState createEncryptionHandlerState() {
return new IdentityEncryptionHandlerState();
}
}