public class CryptoAPIEncryptor extends Encryptor implements java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
protected class |
CryptoAPIEncryptor.CryptoAPICipherOutputStream |
DEFAULT_POIFS_ENTRY| Modifier | Constructor and Description |
|---|---|
protected |
CryptoAPIEncryptor() |
| Modifier and Type | Method and Description |
|---|---|
CryptoAPIEncryptor |
clone() |
void |
confirmPassword(java.lang.String password) |
void |
confirmPassword(java.lang.String password,
byte[] keySpec,
byte[] keySalt,
byte[] verifier,
byte[] verifierSalt,
byte[] integritySalt) |
protected void |
createEncryptionInfoEntry(DirectoryNode dir) |
ChunkedCipherOutputStream |
getDataStream(DirectoryNode dir)
Return a output stream for encrypted data.
|
CryptoAPIEncryptor.CryptoAPICipherOutputStream |
getDataStream(java.io.OutputStream stream,
int initialOffset) |
protected int |
getKeySizeInBytes() |
javax.crypto.Cipher |
initCipherForBlock(javax.crypto.Cipher cipher,
int block)
Initializes a cipher object for a given block index for encryption
|
void |
setChunkSize(int chunkSize)
Sets the chunk size of the data stream.
|
void |
setSummaryEntries(DirectoryNode dir,
java.lang.String encryptedStream,
NPOIFSFileSystem entries)
Encrypt the Document-/SummaryInformation and other optionally streams.
|
getDataStream, getDataStream, getDataStream, getEncryptionInfo, getInstance, getSecretKey, setEncryptionInfo, setSecretKeypublic void confirmPassword(java.lang.String password)
confirmPassword in class Encryptorpublic void confirmPassword(java.lang.String password,
byte[] keySpec,
byte[] keySalt,
byte[] verifier,
byte[] verifierSalt,
byte[] integritySalt)
confirmPassword in class Encryptorpublic javax.crypto.Cipher initCipherForBlock(javax.crypto.Cipher cipher,
int block)
throws java.security.GeneralSecurityException
cipher - may be null, otherwise the given instance is reset to the new block indexblock - the block index, e.g. the persist/slide id (hslf)java.security.GeneralSecurityExceptionpublic ChunkedCipherOutputStream getDataStream(DirectoryNode dir) throws java.io.IOException, java.security.GeneralSecurityException
EncryptorgetDataStream in class Encryptordir - the node to write tojava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic CryptoAPIEncryptor.CryptoAPICipherOutputStream getDataStream(java.io.OutputStream stream, int initialOffset) throws java.io.IOException, java.security.GeneralSecurityException
getDataStream in class Encryptorjava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic void setSummaryEntries(DirectoryNode dir, java.lang.String encryptedStream, NPOIFSFileSystem entries) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOExceptionjava.security.GeneralSecurityExceptionprotected int getKeySizeInBytes()
public void setChunkSize(int chunkSize)
EncryptorsetChunkSize in class EncryptorchunkSize - the chunk size, i.e. the block size with the same encryption keyprotected void createEncryptionInfoEntry(DirectoryNode dir) throws java.io.IOException
java.io.IOExceptionpublic CryptoAPIEncryptor clone() throws java.lang.CloneNotSupportedException
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.