Class AESEngine

java.lang.Object
net.lingala.zip4j.crypto.engine.AESEngine

public class AESEngine extends Object
Core Engine for AES Encryption
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private int
     
    private int
     
    private int
     
    private static final int[]
     
    private int
     
    private static final byte[]
     
    private static final int[]
     
    private int[][]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AESEngine(byte[] key)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    encryptBlock(int[][] KW)
     
    private int[][]
    generateWorkingKey(byte[] key)
     
    private void
    init(byte[] key)
     
    int
    processBlock(byte[] in, byte[] out)
     
    int
    processBlock(byte[] in, int inOff, byte[] out, int outOff)
     
    private int
    shift(int r, int shift)
     
    private void
    stateIn(byte[] bytes, int off)
     
    private void
    stateOut(byte[] bytes, int off)
     
    private int
    subWord(int x)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • rounds

      private int rounds
    • workingKey

      private int[][] workingKey
    • C0

      private int C0
    • C1

      private int C1
    • C2

      private int C2
    • C3

      private int C3
    • S

      private static final byte[] S
    • rcon

      private static final int[] rcon
    • T0

      private static final int[] T0
  • Constructor Details

  • Method Details

    • init

      private void init(byte[] key) throws ZipException
      Throws:
      ZipException
    • generateWorkingKey

      private int[][] generateWorkingKey(byte[] key) throws ZipException
      Throws:
      ZipException
    • processBlock

      public int processBlock(byte[] in, byte[] out) throws ZipException
      Throws:
      ZipException
    • processBlock

      public int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws ZipException
      Throws:
      ZipException
    • stateIn

      private void stateIn(byte[] bytes, int off)
    • stateOut

      private void stateOut(byte[] bytes, int off)
    • encryptBlock

      private void encryptBlock(int[][] KW)
    • shift

      private int shift(int r, int shift)
    • subWord

      private int subWord(int x)