// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_javax_crypto_cipher_Twofish__
#define __gnu_javax_crypto_cipher_Twofish__

#pragma interface

#include <gnu/javax/crypto/cipher/BaseCipher.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace javax
    {
      namespace crypto
      {
        namespace cipher
        {
          class Twofish;
        }
      }
    }
  }
}

class gnu::javax::crypto::cipher::Twofish : public ::gnu::javax::crypto::cipher::BaseCipher
{
private:
  static jint LFSR1 (jint);
  static jint LFSR2 (jint);
  static jint Mx_X (jint);
  static jint Mx_Y (jint);
public:
  Twofish ();
private:
  static jint b0 (jint);
  static jint b1 (jint);
  static jint b2 (jint);
  static jint b3 (jint);
  static jint RS_MDS_Encode (jint, jint);
  static jint RS_rem (jint);
  static jint F32 (jint, jint, jintArray);
  static jint Fe32 (jintArray, jint, jint);
  static jint _b (jint, jint);
public:
  virtual ::java::lang::Object *clone ();
  virtual ::java::util::Iterator *blockSizes ();
  virtual ::java::util::Iterator *keySizes ();
  virtual ::java::lang::Object *makeKey (jbyteArray, jint);
  virtual void encrypt (jbyteArray, jint, jbyteArray, jint, ::java::lang::Object *, jint);
  virtual void decrypt (jbyteArray, jint, jbyteArray, jint, ::java::lang::Object *, jint);
  virtual jboolean selfTest ();
private:
  static ::java::util::logging::Logger *log;
  static const jint DEFAULT_BLOCK_SIZE = 16L;
  static const jint DEFAULT_KEY_SIZE = 16L;
  static const jint MAX_ROUNDS = 16L;
  static const jint ROUNDS = 16L;
  static const jint INPUT_WHITEN = 0L;
  static const jint OUTPUT_WHITEN = 4L;
  static const jint ROUND_SUBKEYS = 8L;
  static const jint SK_STEP = 33686018L;
  static const jint SK_BUMP = 16843009L;
  static const jint SK_ROTL = 9L;
  static JArray< ::java::lang::String *> *Pm;
  static JArray<jbyteArray> * P;
  static const jint P_00 = 1L;
  static const jint P_01 = 0L;
  static const jint P_02 = 0L;
  static const jint P_03 = 1L;
  static const jint P_04 = 1L;
  static const jint P_10 = 0L;
  static const jint P_11 = 0L;
  static const jint P_12 = 1L;
  static const jint P_13 = 1L;
  static const jint P_14 = 0L;
  static const jint P_20 = 1L;
  static const jint P_21 = 1L;
  static const jint P_22 = 0L;
  static const jint P_23 = 0L;
  static const jint P_24 = 0L;
  static const jint P_30 = 0L;
  static const jint P_31 = 1L;
  static const jint P_32 = 1L;
  static const jint P_33 = 0L;
  static const jint P_34 = 1L;
  static const jint GF256_FDBK_2 = 180L;
  static const jint GF256_FDBK_4 = 90L;
  static JArray<jintArray> * MDS;
  static const jint RS_GF_FDBK = 333L;
  static jbyteArray KAT_KEY;
  static jbyteArray KAT_CT;
  static ::java::lang::Boolean *valid;
public:

  static ::java::lang::Class class$;
};

#endif /* __gnu_javax_crypto_cipher_Twofish__ */
