public abstract class SecurityHandler extends Object
| 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()
Gets decryptor object.
|
abstract OutputStreamEncryption |
getEncryptionStream(OutputStream os)
Gets a stream wrapper, responsible for encryption.
|
byte[] |
getMkey()
Gets global encryption key.
|
byte[] |
getNextObjectKey()
Gets encryption key for a particular object/generation.
|
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 MessageDigest md5
protected byte[] extra
public void setHashKeyForNextObject(int objNumber,
int objGeneration)
objNumber - number of particular object for encryptionobjGeneration - generation of particular object for encryptionpublic abstract OutputStreamEncryption getEncryptionStream(OutputStream os)
os - OutputStream to be wrappedOutputStreamEncryption, responsible for encryption.public abstract IDecryptor getDecryptor()
IDecryptorpublic byte[] getNextObjectKey()
public byte[] getMkey()
Copyright © 1998–2024 Apryse Group NV. All rights reserved.