public abstract class Encryptor extends Object implements GenericRecord
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_POIFS_ENTRY |
| Modifier | Constructor and Description |
|---|---|
protected |
Encryptor() |
protected |
Encryptor(Encryptor other) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
confirmPassword(String password) |
abstract void |
confirmPassword(String password,
byte[] keySpec,
byte[] keySalt,
byte[] verifier,
byte[] verifierSalt,
byte[] integritySalt) |
abstract Encryptor |
copy() |
abstract OutputStream |
getDataStream(DirectoryNode dir)
Return an output stream for encrypted data.
|
ChunkedCipherOutputStream |
getDataStream(OutputStream stream,
int initialOffset) |
OutputStream |
getDataStream(POIFSFileSystem fs) |
EncryptionInfo |
getEncryptionInfo() |
Map<String,Supplier<?>> |
getGenericProperties() |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGenericChildren, getGenericRecordTypeprotected static final String DEFAULT_POIFS_ENTRY
protected Encryptor()
protected Encryptor(Encryptor other)
public abstract OutputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException
dir - the node to write toIOExceptionGeneralSecurityExceptionpublic 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
IOExceptionGeneralSecurityExceptionpublic ChunkedCipherOutputStream getDataStream(OutputStream stream, int initialOffset) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic 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 abstract Encryptor copy()
public Map<String,Supplier<?>> getGenericProperties()
getGenericProperties in interface GenericRecord