Class Encryptor
java.lang.Object
org.docx4j.org.apache.poi.poifs.crypt.Encryptor
- Direct Known Subclasses:
AgileEncryptor,BinaryRC4Encryptor,CryptoAPIEncryptor,StandardEncryptor
public abstract class Encryptor
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_POIFS_ENTRY -
Constructor Summary
Constructors Constructor Description Encryptor() -
Method Summary
Modifier and Type Method Description abstract voidconfirmPassword(java.lang.String password)abstract voidconfirmPassword(java.lang.String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt)abstract java.io.OutputStreamgetDataStream(DirectoryNode dir)Return a output stream for encrypted data.java.io.OutputStreamgetDataStream(NPOIFSFileSystem fs)java.io.OutputStreamgetDataStream(OPOIFSFileSystem fs)java.io.OutputStreamgetDataStream(POIFSFileSystem fs)static EncryptorgetInstance(EncryptionInfo info)javax.crypto.SecretKeygetSecretKey()protected voidsetSecretKey(javax.crypto.SecretKey secretKey)
-
Field Details
-
DEFAULT_POIFS_ENTRY
protected static final java.lang.String DEFAULT_POIFS_ENTRY- See Also:
- Constant Field Values
-
-
Constructor Details
-
Encryptor
public Encryptor()
-
-
Method Details
-
getDataStream
public abstract java.io.OutputStream getDataStream(DirectoryNode dir) throws java.io.IOException, java.security.GeneralSecurityExceptionReturn a output stream for encrypted data.- Parameters:
dir- the node to write to- Returns:
- encrypted stream
- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
confirmPassword
public abstract void confirmPassword(java.lang.String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt) -
confirmPassword
public abstract void confirmPassword(java.lang.String password) -
getInstance
-
getDataStream
public java.io.OutputStream getDataStream(NPOIFSFileSystem fs) throws java.io.IOException, java.security.GeneralSecurityException- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
getDataStream
public java.io.OutputStream getDataStream(OPOIFSFileSystem fs) throws java.io.IOException, java.security.GeneralSecurityException- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
getDataStream
public java.io.OutputStream getDataStream(POIFSFileSystem fs) throws java.io.IOException, java.security.GeneralSecurityException- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
getSecretKey
public javax.crypto.SecretKey getSecretKey() -
setSecretKey
protected void setSecretKey(javax.crypto.SecretKey secretKey)
-