Class DESEngine


  • public class DESEngine
    extends java.lang.Object
    a class that provides a basic DES engine. Modified by Matt Brinkley (mdb) ... mainly just removed depends on external classes.
    Version:
    $Id: DESEngine.java,v 1.3.6.1 2009-08-04 10:33:54 ickzon Exp $
    Author:
    Matt Brinkley
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int BLOCK_SIZE  
      private javax.crypto.Cipher cf  
    • Constructor Summary

      Constructors 
      Constructor Description
      DESEngine()
      standard constructor.
      DESEngine​(boolean encrypting, byte[] key)
      mdb: convenient constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithmName()  
      int getBlockSize()  
      void init​(boolean encrypting, byte[] key)
      initialise a DES cipher.
      int processBlock​(byte[] in, int inOff, byte[] out, int outOff)  
      void reset()  
      • Methods inherited from class java.lang.Object

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

      • cf

        private javax.crypto.Cipher cf
    • Constructor Detail

      • DESEngine

        public DESEngine()
        standard constructor.
      • DESEngine

        public DESEngine​(boolean encrypting,
                         byte[] key)
        mdb: convenient constructor
    • Method Detail

      • init

        public void init​(boolean encrypting,
                         byte[] key)
        initialise a DES cipher.
        Parameters:
        encrypting - whether or not we are for encryption.
        key - the parameters required to set up the cipher.
        Throws:
        java.lang.IllegalArgumentException - if the params argument is inappropriate.
      • getAlgorithmName

        public java.lang.String getAlgorithmName()
      • getBlockSize

        public int getBlockSize()
      • processBlock

        public int processBlock​(byte[] in,
                                int inOff,
                                byte[] out,
                                int outOff)
      • reset

        public void reset()