public abstract class Encryptor extends java.lang.Object implements GenericRecord
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEFAULT_POIFS_ENTRY |
Modifier | Constructor and Description |
---|---|
protected |
Encryptor() |
protected |
Encryptor(Encryptor other) |
Modifier and Type | Method and Description |
---|---|
abstract void |
confirmPassword(java.lang.String password) |
abstract void |
confirmPassword(java.lang.String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt) |
abstract Encryptor |
copy() |
abstract java.io.OutputStream |
getDataStream(DirectoryNode dir)
Return a output stream for encrypted data.
(返回加密数据的输出流。)
|
ChunkedCipherOutputStream |
getDataStream(java.io.OutputStream stream, int initialOffset) |
java.io.OutputStream |
getDataStream(POIFSFileSystem fs) |
EncryptionInfo |
getEncryptionInfo() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
static Encryptor |
getInstance(EncryptionInfo info) |
javax.crypto.SecretKey |
getSecretKey() |
void |
setChunkSize(int chunkSize)
Sets the chunk size of the data stream.
(设置数据流的块大小。)
|
void |
setEncryptionInfo(EncryptionInfo encryptionInfo) |
void |
setSecretKey(javax.crypto.SecretKey secretKey) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGenericChildren, getGenericRecordType
protected static final java.lang.String DEFAULT_POIFS_ENTRY
protected Encryptor()
protected Encryptor(Encryptor other)
public abstract java.io.OutputStream getDataStream(DirectoryNode dir) throws java.io.IOException, java.security.GeneralSecurityException
dir
- the node to write to
(dir - 要写入的节点)
java.io.IOException
(java.io.IOException)
java.security.GeneralSecurityException
(java.security.GeneralSecurityException)
public abstract void confirmPassword(java.lang.String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt)
public abstract void confirmPassword(java.lang.String password)
public static Encryptor getInstance(EncryptionInfo info)
public java.io.OutputStream getDataStream(POIFSFileSystem fs) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
(java.io.IOException)
java.security.GeneralSecurityException
(java.security.GeneralSecurityException)
public ChunkedCipherOutputStream getDataStream(java.io.OutputStream stream, int initialOffset) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
(java.io.IOException)
java.security.GeneralSecurityException
(java.security.GeneralSecurityException)
public javax.crypto.SecretKey getSecretKey()
public void setSecretKey(javax.crypto.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 key
(chunkSize - 块大小,即具有相同加密密钥的块大小)
public abstract Encryptor copy()
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.