@NotThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) final class WinZipAesEntryExtraField extends ExtraField
RawZipOutputStream.WinZipAesOutputMethod| Modifier and Type | Field and Description |
|---|---|
private static int |
DATA_SIZE |
private byte |
encryptionStrength |
private static AesKeyStrength[] |
KEY_STRENGTHS |
private short |
method |
private static int |
VENDOR_ID |
private short |
vendorVersion |
(package private) static int |
VV_AE_1
Entries of this type do include the standard ZIP CRC-32
value.
|
(package private) static int |
VV_AE_2
Entries of this type do not include the standard ZIP CRC-32
value.
|
WINZIP_AES_ID, ZIP64_HEADER_ID| Constructor and Description |
|---|
WinZipAesEntryExtraField()
Constructs a new WinZip AES Extra Field.
|
| Modifier and Type | Method and Description |
|---|---|
private static byte |
encryptionStrength(AesKeyStrength keyStrength) |
(package private) int |
getDataSize()
Returns the Data Size of this Extra Field.
|
(package private) int |
getHeaderId()
Returns the Header ID (type) of this Extra Field.
|
(package private) AesKeyStrength |
getKeyStrength() |
(package private) int |
getMethod() |
(package private) int |
getVendorId() |
(package private) int |
getVendorVersion()
Returns the vendor version.
|
private static AesKeyStrength |
keyStrength(int encryptionStrength) |
(package private) void |
readFrom(byte[] src,
int off,
int size)
Initializes this Extra Field by deserializing a Data Block of
size bytes from the
byte array data at the zero based offset off. |
(package private) void |
setKeyStrength(AesKeyStrength keyStrength) |
(package private) void |
setMethod(int compressionMethod) |
(package private) void |
setVendorVersion(int vendorVersion)
Sets the vendor version.
|
(package private) void |
writeTo(byte[] dst,
int off)
Serializes a Data Block of
ExtraField.getDataSize() bytes to the
byte array data at the zero based offset off. |
create, getDataBlock, registerprivate static final int DATA_SIZE
private byte encryptionStrength
private static final AesKeyStrength[] KEY_STRENGTHS
private short method
private static final int VENDOR_ID
private short vendorVersion
static final int VV_AE_1
setVendorVersion(int)/getVendorVersion().static final int VV_AE_2
setVendorVersion(int)/getVendorVersion().WinZipAesEntryExtraField()
private static byte encryptionStrength(AesKeyStrength keyStrength)
int getDataSize()
ExtraFieldExtraField.readFrom(byte[], int, int).getDataSize in class ExtraField0 if unknown.ExtraField.getDataBlock()int getHeaderId()
ExtraFieldgetHeaderId in class ExtraFieldAesKeyStrength getKeyStrength()
int getMethod()
int getVendorId()
private static AesKeyStrength keyStrength(int encryptionStrength)
void readFrom(byte[] src,
int off,
int size)
ExtraFieldsize bytes from the
byte array data at the zero based offset off.
Upon return, this Extra Field shall not access data
subsequently and ExtraField.getDataSize() must equal size.readFrom in class ExtraFieldsrc - The byte array to read the Data Block from.off - The zero based offset in the byte array where the first byte
of the Data Block is read from.size - The length of the Data Block in bytes.ExtraField.getDataSize()void setKeyStrength(AesKeyStrength keyStrength)
void setMethod(int compressionMethod)
void setVendorVersion(int vendorVersion)
vendorVersion - the vendor version.IllegalArgumentExceptionVV_AE_1,
VV_AE_2void writeTo(byte[] dst,
int off)
ExtraFieldExtraField.getDataSize() bytes to the
byte array data at the zero based offset off.
Upon return, this Extra Field shall not access data
subsequently.writeTo in class ExtraFielddst - The byte array to write the Data Block to.off - The zero based offset in the byte array where the first byte
of the Data Block is written to.ExtraField.getDataSize()Copyright © 2004-2011 Schlichtherle IT Services. All Rights Reserved.