
// 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
{

  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, JArray< jint > *);
  static jint Fe32(JArray< jint > *, jint, jint);
  static jint _b(jint, jint);
public:
  ::java::lang::Object * clone();
  ::java::util::Iterator * blockSizes();
  ::java::util::Iterator * keySizes();
  ::java::lang::Object * makeKey(JArray< jbyte > *, jint);
  void encrypt(JArray< jbyte > *, jint, JArray< jbyte > *, jint, ::java::lang::Object *, jint);
  void decrypt(JArray< jbyte > *, jint, JArray< jbyte > *, jint, ::java::lang::Object *, jint);
  jboolean selfTest();
private:
  static ::java::util::logging::Logger * log;
  static const jint DEFAULT_BLOCK_SIZE = 16;
  static const jint DEFAULT_KEY_SIZE = 16;
  static const jint MAX_ROUNDS = 16;
  static const jint ROUNDS = 16;
  static const jint INPUT_WHITEN = 0;
  static const jint OUTPUT_WHITEN = 4;
  static const jint ROUND_SUBKEYS = 8;
  static const jint SK_STEP = 33686018;
  static const jint SK_BUMP = 16843009;
  static const jint SK_ROTL = 9;
  static JArray< ::java::lang::String * > * Pm;
  static JArray< JArray< jbyte > * > * P;
  static const jint P_00 = 1;
  static const jint P_01 = 0;
  static const jint P_02 = 0;
  static const jint P_03 = 1;
  static const jint P_04 = 1;
  static const jint P_10 = 0;
  static const jint P_11 = 0;
  static const jint P_12 = 1;
  static const jint P_13 = 1;
  static const jint P_14 = 0;
  static const jint P_20 = 1;
  static const jint P_21 = 1;
  static const jint P_22 = 0;
  static const jint P_23 = 0;
  static const jint P_24 = 0;
  static const jint P_30 = 0;
  static const jint P_31 = 1;
  static const jint P_32 = 1;
  static const jint P_33 = 0;
  static const jint P_34 = 1;
  static const jint GF256_FDBK_2 = 180;
  static const jint GF256_FDBK_4 = 90;
  static JArray< JArray< jint > * > * MDS;
  static const jint RS_GF_FDBK = 333;
  static JArray< jbyte > * KAT_KEY;
  static JArray< jbyte > * KAT_CT;
  static ::java::lang::Boolean * valid;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_javax_crypto_cipher_Twofish__
