Class AES256SHA256Decoder
java.lang.Object
org.apache.commons.compress.archivers.sevenz.AbstractCoder
org.apache.commons.compress.archivers.sevenz.AES256SHA256Decoder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) InputStream
decode
(String archiveName, InputStream in, long uncompressedLength, Coder coder, byte[] passwordBytes, int maxMemoryLimitInKb) Decodes using stream that reads from in using the configured coder and password.(package private) OutputStream
encode
(OutputStream out, Object options) Encodes using a stream that writes to out using the given configuration.(package private) byte[]
getOptionsAsProperties
(Object options) Gets property bytes to write in a Folder block.(package private) static byte[]
sha256Password
(byte[] password, int numCyclesPower, byte[] salt) (package private) static byte[]
sha256Password
(char[] password, int numCyclesPower, byte[] salt) (package private) static byte[]
utf16Decode
(char[] chars) Convenience method that encodes Unicode characters into bytes in UTF-16 (little-endian byte order) charsetMethods inherited from class org.apache.commons.compress.archivers.sevenz.AbstractCoder
getOptionsFromCoder, isOptionInstance, toInt
-
Constructor Details
-
AES256SHA256Decoder
AES256SHA256Decoder()
-
-
Method Details
-
sha256Password
static byte[] sha256Password(byte[] password, int numCyclesPower, byte[] salt) -
sha256Password
static byte[] sha256Password(char[] password, int numCyclesPower, byte[] salt) -
utf16Decode
static byte[] utf16Decode(char[] chars) Convenience method that encodes Unicode characters into bytes in UTF-16 (little-endian byte order) charset- Parameters:
chars
- characters to encode- Returns:
- encoded characters
- Since:
- 1.23
-
decode
InputStream decode(String archiveName, InputStream in, long uncompressedLength, Coder coder, byte[] passwordBytes, int maxMemoryLimitInKb) Description copied from class:AbstractCoder
Decodes using stream that reads from in using the configured coder and password.- Specified by:
decode
in classAbstractCoder
- Returns:
- a stream that reads from in using the configured coder and password.
-
encode
Description copied from class:AbstractCoder
Encodes using a stream that writes to out using the given configuration.- Overrides:
encode
in classAbstractCoder
- Returns:
- a stream that writes to out using the given configuration.
- Throws:
IOException
- Optionally thrown by subclassses.
-
getOptionsAsProperties
Description copied from class:AbstractCoder
Gets property bytes to write in a Folder block.- Overrides:
getOptionsAsProperties
in classAbstractCoder
- Returns:
- property bytes to write in a Folder block.
- Throws:
IOException
- Optionally thrown by subclassses.
-