random_.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore random methods.
  13. */
  14. #ifndef MAGICKCORE_RANDOM__H
  15. #define MAGICKCORE_RANDOM__H
  16. #include "magick/string_.h"
  17. #if defined(__cplusplus) || defined(c_plusplus)
  18. extern "C" {
  19. #endif
  20. /*
  21. Typedef declarations.
  22. */
  23. typedef struct _RandomInfo
  24. RandomInfo;
  25. /*
  26. Method declarations.
  27. */
  28. extern MagickExport double
  29. GetRandomValue(RandomInfo *),
  30. GetPseudoRandomValue(RandomInfo *magick_restrict);
  31. extern MagickExport MagickBooleanType
  32. RandomComponentGenesis(void);
  33. extern MagickExport RandomInfo
  34. *AcquireRandomInfo(void),
  35. *DestroyRandomInfo(RandomInfo *);
  36. extern MagickExport StringInfo
  37. *GetRandomKey(RandomInfo *,const size_t);
  38. extern MagickExport unsigned long
  39. GetRandomSecretKey(const RandomInfo *);
  40. extern MagickExport void
  41. RandomComponentTerminus(void),
  42. SeedPseudoRandomGenerator(const unsigned long),
  43. SetRandomKey(RandomInfo *,const size_t,unsigned char *),
  44. SetRandomSecretKey(const unsigned long),
  45. SetRandomTrueRandom(const MagickBooleanType);
  46. #if defined(__cplusplus) || defined(c_plusplus)
  47. }
  48. #endif
  49. #endif