public abstract class Encryptor extends Object implements Cloneable
Constructor and Description |
---|
Encryptor() |
Modifier and Type | Method and Description |
---|---|
Encryptor |
clone() |
abstract void |
confirmPassword(String password) |
abstract void |
confirmPassword(String password,
byte[] keySpec,
byte[] keySalt,
byte[] verifier,
byte[] verifierSalt,
byte[] integritySalt) |
abstract OutputStream |
getDataStream(DirectoryNode dir)
Return a output stream for encrypted data.
|
ChunkedCipherOutputStream |
getDataStream(OutputStream stream,
int initialOffset) |
OutputStream |
getDataStream(POIFSFileSystem fs) |
EncryptionInfo |
getEncryptionInfo() |
static Encryptor |
getInstance(EncryptionInfo info) |
SecretKey |
getSecretKey() |
void |
setChunkSize(int chunkSize)
Sets the chunk size of the data stream.
|
void |
setEncryptionInfo(EncryptionInfo encryptionInfo) |
void |
setSecretKey(SecretKey secretKey) |
public abstract OutputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException
dir
- the node to write toIOException
GeneralSecurityException
public abstract void confirmPassword(String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt)
public abstract void confirmPassword(String password)
public static Encryptor getInstance(EncryptionInfo info)
public OutputStream getDataStream(POIFSFileSystem fs) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public ChunkedCipherOutputStream getDataStream(OutputStream stream, int initialOffset) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public SecretKey getSecretKey()
public void setSecretKey(SecretKey secretKey)
public EncryptionInfo getEncryptionInfo()
public void setEncryptionInfo(EncryptionInfo encryptionInfo)
public void setChunkSize(int chunkSize)
chunkSize
- the chunk size, i.e. the block size with the same encryption keypublic Encryptor clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2010 - 2020 Adobe. All Rights Reserved