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

#ifndef __gnu_javax_crypto_prng_CSPRNG__
#define __gnu_javax_crypto_prng_CSPRNG__

#pragma interface

#include <gnu/java/security/prng/BasePRNG.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace java
    {
      namespace security
      {
        namespace prng
        {
          class IRandom;
        }
        namespace hash
        {
          class IMessageDigest;
        }
      }
    }
    namespace javax
    {
      namespace crypto
      {
        namespace cipher
        {
          class IBlockCipher;
        }
        namespace prng
        {
          class CSPRNG;
          class CSPRNG$Poller;
          class CSPRNG$Spinner;
        }
      }
    }
  }
}

class gnu::javax::crypto::prng::CSPRNG : public ::gnu::java::security::prng::BasePRNG
{
public:
  CSPRNG ();
  static ::gnu::java::security::prng::IRandom *getSystemInstance ();
private:
  static ::java::lang::String *getProperty (::java::lang::String *);
  static ::java::util::List *parseString (::java::lang::String *);
  static ::java::util::List *parseURL (::java::lang::String *);
public:
  virtual ::java::lang::Object *clone ();
  virtual void setup (::java::util::Map *);
  virtual void fillBlock ();
  virtual void addRandomBytes (jbyteArray, jint, jint);
  virtual void addRandomByte (jbyte);
public: // actually package-private
  virtual void addQuality (jdouble);
  virtual jdouble getQuality ();
private:
  void mixRandomPool (jbyteArray);
  void mixRandomPool ();
  void generateX917 (jbyteArray);
  void fastPoll ();
  void slowPoll ();
public:  // actually protected
  virtual void finalize ();
private:
  static ::java::util::logging::Logger *log;
public:
  static ::java::lang::String *FILE_SOURCES;
  static ::java::lang::String *URL_SOURCES;
  static ::java::lang::String *PROGRAM_SOURCES;
  static ::java::lang::String *OTHER_SOURCES;
  static ::java::lang::String *BLOCKING;
private:
  static ::java::lang::String *FILES;
  static ::java::lang::String *URLS;
  static ::java::lang::String *PROGS;
  static ::java::lang::String *OTHER;
  static ::java::lang::String *BLOCK;
  static const jint POOL_SIZE = 256L;
  static const jint ALLOC_SIZE = 260L;
  static const jint OUTPUT_SIZE = 128L;
  static const jint X917_POOL_SIZE = 16L;
  static ::java::lang::String *HASH_FUNCTION;
  static ::java::lang::String *CIPHER;
  static const jint MIX_COUNT = 10L;
  static const jint X917_LIFETIME = 8192L;
  static const jint SPINNER_COUNT = 8L;
  static JArray< ::gnu::javax::crypto::prng::CSPRNG$Spinner *> *SPINNERS;
  static JArray< ::java::lang::Thread *> *SPINNER_THREADS;
  ::gnu::java::security::hash::IMessageDigest * __attribute__((aligned(__alignof__( ::gnu::java::security::prng::BasePRNG )))) hash;
  ::gnu::javax::crypto::cipher::IBlockCipher *cipher;
  jint mixCount;
  jbyteArray pool;
  jdouble quality;
  jint index;
  jbyteArray x917pool;
  jint x917count;
  jboolean x917init;
  ::java::util::List *files;
  ::java::util::List *urls;
  ::java::util::List *progs;
  ::java::util::List *other;
  jboolean blocking;
  ::gnu::javax::crypto::prng::CSPRNG$Poller *poller;
  ::java::lang::Thread *pollerThread;

  friend class gnu_javax_crypto_prng_CSPRNG$Poller;
  friend class gnu_javax_crypto_prng_CSPRNG$Spinner;
  friend class gnu_javax_crypto_prng_CSPRNG$1;
public:

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

#endif /* __gnu_javax_crypto_prng_CSPRNG__ */
