Class JavaCrypt


  • public class JavaCrypt
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int[] con_salt  
      private static int[] cov_2char  
      private static int ITERATIONS  
      private static boolean[] shifts2  
      private static int[][] skb  
      private static int[][] SPtrans  
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaCrypt()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static int[] body​(int[] schedule, int Eswap0, int Eswap1)  
      private static int byteToUnsigned​(byte b)  
      static java.lang.CharSequence crypt​(java.lang.CharSequence original, java.lang.CharSequence salt)  
      private static int D_ENCRYPT​(int L, int R, int S, int E0, int E1, int[] s)  
      private static int[] des_set_key​(byte[] key)  
      private static int fourBytesToInt​(byte[] b, int offset)  
      private static int HPERM_OP​(int a, int n, int m)  
      private static void intToFourBytes​(int iValue, byte[] b, int offset)  
      private static void PERM_OP​(int a, int b, int n, int m, int[] results)  
      • Methods inherited from class java.lang.Object

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

      • con_salt

        private static final int[] con_salt
      • shifts2

        private static final boolean[] shifts2
      • skb

        private static final int[][] skb
      • SPtrans

        private static final int[][] SPtrans
      • cov_2char

        private static final int[] cov_2char
    • Constructor Detail

      • JavaCrypt

        public JavaCrypt()
    • Method Detail

      • byteToUnsigned

        private static final int byteToUnsigned​(byte b)
      • fourBytesToInt

        private static int fourBytesToInt​(byte[] b,
                                          int offset)
      • intToFourBytes

        private static final void intToFourBytes​(int iValue,
                                                 byte[] b,
                                                 int offset)
      • PERM_OP

        private static final void PERM_OP​(int a,
                                          int b,
                                          int n,
                                          int m,
                                          int[] results)
      • HPERM_OP

        private static final int HPERM_OP​(int a,
                                          int n,
                                          int m)
      • des_set_key

        private static int[] des_set_key​(byte[] key)
      • D_ENCRYPT

        private static final int D_ENCRYPT​(int L,
                                           int R,
                                           int S,
                                           int E0,
                                           int E1,
                                           int[] s)
      • body

        private static final int[] body​(int[] schedule,
                                        int Eswap0,
                                        int Eswap1)
      • crypt

        public static final java.lang.CharSequence crypt​(java.lang.CharSequence original,
                                                         java.lang.CharSequence salt)