Class AES256SHA256Decoder

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.io.InputStream decode​(java.lang.String archiveName, java.io.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) java.io.OutputStream encode​(java.io.OutputStream out, java.lang.Object options)
      Encodes using a stream that writes to out using the given configuration.
      (package private) byte[] getOptionsAsProperties​(java.lang.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) charset
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AES256SHA256Decoder

        AES256SHA256Decoder()
    • Method Detail

      • 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

        java.io.InputStream decode​(java.lang.String archiveName,
                                   java.io.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 class AbstractCoder
        Returns:
        a stream that reads from in using the configured coder and password.
      • encode

        java.io.OutputStream encode​(java.io.OutputStream out,
                                    java.lang.Object options)
                             throws java.io.IOException
        Description copied from class: AbstractCoder
        Encodes using a stream that writes to out using the given configuration.
        Overrides:
        encode in class AbstractCoder
        Returns:
        a stream that writes to out using the given configuration.
        Throws:
        java.io.IOException - Optionally thrown by subclassses.
      • getOptionsAsProperties

        byte[] getOptionsAsProperties​(java.lang.Object options)
                               throws java.io.IOException
        Description copied from class: AbstractCoder
        Gets property bytes to write in a Folder block.
        Overrides:
        getOptionsAsProperties in class AbstractCoder
        Returns:
        property bytes to write in a Folder block.
        Throws:
        java.io.IOException - Optionally thrown by subclassses.