public class CryptoAPIEncryptor extends Encryptor
DEFAULT_POIFS_ENTRY
Modifier | Constructor and Description |
---|---|
protected |
CryptoAPIEncryptor(CryptoAPIEncryptionInfoBuilder builder) |
Modifier and Type | Method and Description |
---|---|
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) |
java.io.OutputStream |
getDataStream(DirectoryNode dir)
Encrypt the Document-/SummaryInformation and other optionally streams.
|
protected int |
getKeySizeInBytes() |
javax.crypto.Cipher |
initCipherForBlock(javax.crypto.Cipher cipher,
int block)
Initializes a cipher object for a given block index for encryption
|
getDataStream, getDataStream, getDataStream, getInstance, getSecretKey, setSecretKey
protected CryptoAPIEncryptor(CryptoAPIEncryptionInfoBuilder builder)
public void confirmPassword(java.lang.String password)
confirmPassword
in class Encryptor
public void confirmPassword(java.lang.String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt)
confirmPassword
in class Encryptor
public 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.GeneralSecurityException
public java.io.OutputStream getDataStream(DirectoryNode dir) throws java.io.IOException, java.security.GeneralSecurityException
getDataStream
in class Encryptor
dir
- the node to write tojava.io.IOException
java.security.GeneralSecurityException
protected int getKeySizeInBytes()
protected void createEncryptionInfoEntry(DirectoryNode dir) throws java.io.IOException
java.io.IOException
Copyright 2016 The Apache Software Foundation or its licensors, as applicable.