libcryptosec
Random.h
Go to the documentation of this file.
1 #ifndef RANDOM_H_
2 #define RANDOM_H_
3 
4 /* OpenSSL includes */
5 #include <openssl/rand.h>
6 /* c++ objects includes */
7 #include <string>
8 /* local includes */
9 #include "ByteArray.h"
11 
18 class Random
19 {
20 public:
21 
28  static ByteArray bytes(int nbytes) throw (RandomException);
29 
36  static ByteArray pseudoBytes(int nbytes) throw (RandomException);
37 
42  static void seedData(ByteArray &data);
43 
49  static void seedFile(std::string &filename, int nbytes) throw (RandomException);
50 
54  static void cleanSeed();
55 
60  static bool status();
61 };
62 
63 #endif /*RANDOM_H_*/
static ByteArray pseudoBytes(int nbytes)
Definition: Random.cpp:20
Definition: RandomException.h:6
static bool status()
Definition: Random.cpp:57
static void cleanSeed()
Definition: Random.cpp:52
static void seedFile(std::string &filename, int nbytes)
Definition: Random.cpp:42
Implementa funcionalidades de um Gerador de Números Aleatórios. Esta classe possui apenas métodos est...
Definition: Random.h:18
Classe usada para transportar dados binários pelo sistema. Pode ser usada para conversão de texto em ...
Definition: ByteArray.h:24
static ByteArray bytes(int nbytes)
Definition: Random.cpp:3
static void seedData(ByteArray &data)
Definition: Random.cpp:37