Fortuna$Generator.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
  2. #ifndef __gnu_javax_crypto_prng_Fortuna$Generator__
  3. #define __gnu_javax_crypto_prng_Fortuna$Generator__
  4. #pragma interface
  5. #include <gnu/java/security/prng/BasePRNG.h>
  6. #include <gcj/array.h>
  7. extern "Java"
  8. {
  9. namespace gnu
  10. {
  11. namespace java
  12. {
  13. namespace security
  14. {
  15. namespace hash
  16. {
  17. class IMessageDigest;
  18. }
  19. }
  20. }
  21. namespace javax
  22. {
  23. namespace crypto
  24. {
  25. namespace cipher
  26. {
  27. class IBlockCipher;
  28. }
  29. namespace prng
  30. {
  31. class Fortuna$Generator;
  32. }
  33. }
  34. }
  35. }
  36. }
  37. class gnu::javax::crypto::prng::Fortuna$Generator : public ::gnu::java::security::prng::BasePRNG
  38. {
  39. public:
  40. Fortuna$Generator(::gnu::javax::crypto::cipher::IBlockCipher *, ::gnu::java::security::hash::IMessageDigest *);
  41. virtual jbyte nextByte();
  42. virtual void nextBytes(JArray< jbyte > *, jint, jint);
  43. virtual void addRandomByte(jbyte);
  44. virtual void addRandomBytes(JArray< jbyte > *, jint, jint);
  45. virtual void fillBlock();
  46. virtual void setup(::java::util::Map *);
  47. private:
  48. void resetKey();
  49. void incrementCounter();
  50. static const jint LIMIT = 1048576;
  51. ::gnu::javax::crypto::cipher::IBlockCipher * __attribute__((aligned(__alignof__( ::gnu::java::security::prng::BasePRNG)))) cipher;
  52. ::gnu::java::security::hash::IMessageDigest * hash;
  53. JArray< jbyte > * counter;
  54. JArray< jbyte > * key;
  55. jboolean seeded;
  56. public:
  57. static ::java::lang::Class class$;
  58. };
  59. #endif // __gnu_javax_crypto_prng_Fortuna$Generator__