
// 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 hash
        {
            class IMessageDigest;
        }
        namespace prng
        {
            class IRandom;
        }
      }
    }
    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(JArray< jbyte > *, jint, jint);
  virtual void addRandomByte(jbyte);
public: // actually package-private
  virtual void addQuality(jdouble);
  virtual jdouble getQuality();
private:
  void mixRandomPool(JArray< jbyte > *);
  void mixRandomPool();
  void generateX917(JArray< jbyte > *);
  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 = 256;
  static const jint ALLOC_SIZE = 260;
  static const jint OUTPUT_SIZE = 128;
  static const jint X917_POOL_SIZE = 16;
  static ::java::lang::String * HASH_FUNCTION;
  static ::java::lang::String * CIPHER;
  static const jint MIX_COUNT = 10;
  static const jint X917_LIFETIME = 8192;
  static const jint SPINNER_COUNT = 8;
  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;
  JArray< jbyte > * pool;
  jdouble quality;
  jint index;
  JArray< jbyte > * 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;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_javax_crypto_prng_CSPRNG__
