public abstract class SecurityHandler extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected byte[] |
extra
Work area to prepare the object/generation bytes
|
protected MessageDigest |
md5 |
protected byte[] |
mkey
The global encryption key
|
protected byte[] |
nextObjectKey
The encryption key for a particular object/generation.
|
protected int |
nextObjectKeySize
The encryption key length for a particular object/generation It is recalculated with setHashKeyForNextObject(int,int) for every object individually based in its object/generation.
|
Modifier | Constructor and Description |
---|---|
protected |
SecurityHandler() |
Modifier and Type | Method and Description |
---|---|
abstract IDecryptor |
getDecryptor() |
abstract OutputStreamEncryption |
getEncryptionStream(OutputStream os) |
void |
setHashKeyForNextObject(int objNumber, int objGeneration)
Note: For most of the supported security handlers algorithm to calculate encryption key for particular object is the same.
|
protected byte[] mkey
protected byte[] nextObjectKey
setHashKeyForNextObject(int,int)
for every object individually based in its object/generation.
protected int nextObjectKeySize
setHashKeyForNextObject(int,int)
for every object individually based in its object/generation.
protected transient MessageDigest md5
protected byte[] extra
public void setHashKeyForNextObject(int objNumber, int objGeneration)
objNumber
-
objGeneration
-
public abstract OutputStreamEncryption getEncryptionStream(OutputStream os)
public abstract IDecryptor getDecryptor()
Copyright © 1998–2020 iText Group NV. All rights reserved.