Class AESEngine


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

      Fields 
      Modifier and Type Field Description
      private int C0  
      private int C1  
      private int C2  
      private int C3  
      private static int[] rcon  
      private int rounds  
      private static byte[] S  
      private static int[] T0  
      private int[][] workingKey  
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      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 Detail

      • 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
    • Method Detail

      • 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)