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

#ifndef __javax_crypto_Cipher__
#define __javax_crypto_Cipher__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace security
    {
      namespace spec
      {
        class AlgorithmParameterSpec;
      }
      class SecureRandom;
      class Key;
      namespace cert
      {
        class Certificate;
      }
      class AlgorithmParameters;
      class Provider;
    }
  }
  namespace javax
  {
    namespace crypto
    {
      class ExemptionMechanism;
      class Cipher;
      class CipherSpi;
    }
  }
}

class javax::crypto::Cipher : public ::java::lang::Object
{
public:
  static ::javax::crypto::Cipher *getInstance (::java::lang::String *);
  static ::javax::crypto::Cipher *getInstance (::java::lang::String *, ::java::lang::String *);
  static ::javax::crypto::Cipher *getInstance (::java::lang::String *, ::java::security::Provider *);
public:  // actually protected
  Cipher (::javax::crypto::CipherSpi *, ::java::security::Provider *, ::java::lang::String *);
public:
  virtual ::java::lang::String *getAlgorithm () { return transformation; }
  virtual jint getBlockSize ();
  virtual ::javax::crypto::ExemptionMechanism *getExemptionMechanism () { return 0; }
  virtual jbyteArray getIV ();
  virtual ::java::security::AlgorithmParameters *getParameters ();
  virtual ::java::security::Provider *getProvider () { return provider; }
  virtual jbyteArray doFinal ();
  virtual jbyteArray doFinal (jbyteArray);
  virtual jbyteArray doFinal (jbyteArray, jint, jint);
  virtual jint doFinal (jbyteArray, jint);
  virtual jint doFinal (jbyteArray, jint, jint, jbyteArray, jint);
  virtual jint doFinal (jbyteArray, jint, jint, jbyteArray);
  virtual jint getOutputSize (jint);
  virtual void init (jint, ::java::security::cert::Certificate *);
  virtual void init (jint, ::java::security::Key *);
  virtual void init (jint, ::java::security::cert::Certificate *, ::java::security::SecureRandom *);
  virtual void init (jint, ::java::security::Key *, ::java::security::SecureRandom *);
  virtual void init (jint, ::java::security::Key *, ::java::security::AlgorithmParameters *);
  virtual void init (jint, ::java::security::Key *, ::java::security::spec::AlgorithmParameterSpec *);
  virtual void init (jint, ::java::security::Key *, ::java::security::AlgorithmParameters *, ::java::security::SecureRandom *);
  virtual void init (jint, ::java::security::Key *, ::java::security::spec::AlgorithmParameterSpec *, ::java::security::SecureRandom *);
  virtual ::java::security::Key *unwrap (jbyteArray, ::java::lang::String *, jint);
  virtual jbyteArray update (jbyteArray);
  virtual jbyteArray update (jbyteArray, jint, jint);
  virtual jint update (jbyteArray, jint, jint, jbyteArray);
  virtual jint update (jbyteArray, jint, jint, jbyteArray, jint);
  virtual jbyteArray wrap (::java::security::Key *);
private:
  static ::java::lang::String *SERVICE;
public:
  static const jint DECRYPT_MODE = 2L;
  static const jint ENCRYPT_MODE = 1L;
  static const jint PRIVATE_KEY = 2L;
  static const jint PUBLIC_KEY = 1L;
  static const jint SECRET_KEY = 3L;
  static const jint UNWRAP_MODE = 4L;
  static const jint WRAP_MODE = 3L;
private:
  static const jint INITIAL_STATE = 0L;
  ::javax::crypto::CipherSpi * __attribute__((aligned(__alignof__( ::java::lang::Object )))) cipherSpi;
  ::java::security::Provider *provider;
  ::java::lang::String *transformation;
  jint state;
public:

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

#endif /* __javax_crypto_Cipher__ */
