Top Fields Constructors Methods
org.apache.poi.poifs.crypt.agile

public Class PasswordKeyEncryptor

extends Object
Class Inheritance
Imports
org.apache.poi.EncryptedDocumentException, org.apache.poi.poifs.crypt.ChainingMode, .CipherAlgorithm, .HashAlgorithm, org.w3c.dom.Document, .Element

Field Summary

Modifier and TypeField and Description
private Integer
blockSize

An unsigned integer that specifies the number of bytes used to encrypt one block of data.

private CipherAlgorithm
cipherAlgorithm

A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor.

private ChainingMode
cipherChaining

A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.

private byte[]
encryptedKeyValue

A base64-encoded value that specifies the encrypted form of the intermediate key.

private byte[]
encryptedVerifierHashInput

A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.

private byte[]
encryptedVerifierHashValue

A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.

private HashAlgorithm
hashAlgorithm

A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor.

private Integer
hashSize

An unsigned integer that specifies the number of bytes used by a hash value.

private Integer
keyBits

An unsigned integer that specifies the number of bits used by an encryption algorithm.

private Integer
saltSize

An unsigned integer that specifies the number of bytes used by a salt.

private byte[]
saltValue

A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor.

private Integer
spinCount

A SpinCount that specifies the spin count for a PasswordKeyEncryptor.

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Integer
public CipherAlgorithm
public ChainingMode
public byte[]
public byte[]
public byte[]
public HashAlgorithm
public Integer
public Integer
public Integer
public byte[]
public Integer
public void
setBlockSize(Integer blockSize)

public void
public void
public void
setEncryptedKeyValue(byte[] encryptedKeyValue)

public void
setEncryptedVerifierHashInput(byte[] encryptedVerifierHashInput)

public void
setEncryptedVerifierHashValue(byte[] encryptedVerifierHashValue)

public void
public void
setHashSize(Integer hashSize)

public void
public void
setSaltSize(Integer saltSize)

public void
setSaltValue(byte[] saltValue)

public void
setSpinCount(Integer spinCount)

pack-priv void
write(Element encryption)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blockSizeback to summary
private Integer blockSize

An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.

cipherAlgorithmback to summary
private CipherAlgorithm cipherAlgorithm

A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.

cipherChainingback to summary
private ChainingMode cipherChaining

A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.

encryptedKeyValueback to summary
private byte[] encryptedKeyValue

A base64-encoded value that specifies the encrypted form of the intermediate key.

encryptedVerifierHashInputback to summary
private byte[] encryptedVerifierHashInput

A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.

encryptedVerifierHashValueback to summary
private byte[] encryptedVerifierHashValue

A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.

hashAlgorithmback to summary
private HashAlgorithm hashAlgorithm

A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.

hashSizeback to summary
private Integer hashSize

An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.

keyBitsback to summary
private Integer keyBits

An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.

saltSizeback to summary
private Integer saltSize

An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.

saltValueback to summary
private byte[] saltValue

A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.

spinCountback to summary
private Integer spinCount

A SpinCount that specifies the spin count for a PasswordKeyEncryptor.

Constructor Detail

PasswordKeyEncryptorback to summary
public PasswordKeyEncryptor()
PasswordKeyEncryptorback to summary
public PasswordKeyEncryptor(Element passwordKey)

Method Detail

getBlockSizeback to summary
public Integer getBlockSize()
getCipherAlgorithmback to summary
public CipherAlgorithm getCipherAlgorithm()
getCipherChainingback to summary
public ChainingMode getCipherChaining()
getEncryptedKeyValueback to summary
public byte[] getEncryptedKeyValue()
getEncryptedVerifierHashInputback to summary
public byte[] getEncryptedVerifierHashInput()
getEncryptedVerifierHashValueback to summary
public byte[] getEncryptedVerifierHashValue()
getHashAlgorithmback to summary
public HashAlgorithm getHashAlgorithm()
getHashSizeback to summary
public Integer getHashSize()
getKeyBitsback to summary
public Integer getKeyBits()
getSaltSizeback to summary
public Integer getSaltSize()
getSaltValueback to summary
public byte[] getSaltValue()
getSpinCountback to summary
public Integer getSpinCount()
setBlockSizeback to summary
public void setBlockSize(Integer blockSize)
setCipherAlgorithmback to summary
public void setCipherAlgorithm(CipherAlgorithm cipherAlgorithm)
setCipherChainingback to summary
public void setCipherChaining(ChainingMode cipherChaining)
setEncryptedKeyValueback to summary
public void setEncryptedKeyValue(byte[] encryptedKeyValue)
setEncryptedVerifierHashInputback to summary
public void setEncryptedVerifierHashInput(byte[] encryptedVerifierHashInput)
setEncryptedVerifierHashValueback to summary
public void setEncryptedVerifierHashValue(byte[] encryptedVerifierHashValue)
setHashAlgorithmback to summary
public void setHashAlgorithm(HashAlgorithm hashAlgorithm)
setHashSizeback to summary
public void setHashSize(Integer hashSize)
setKeyBitsback to summary
public void setKeyBits(Integer keyBits)
setSaltSizeback to summary
public void setSaltSize(Integer saltSize)
setSaltValueback to summary
public void setSaltValue(byte[] saltValue)
setSpinCountback to summary
public void setSpinCount(Integer spinCount)
writeback to summary
pack-priv void write(Element encryption)