forked from malekremy/cryptofuzz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mutatorpool.cpp
52 lines (46 loc) · 2.81 KB
/
mutatorpool.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "mutatorpool.h"
uint32_t PRNG(void);
template <class T, size_t Size>
void MutatorPool<T, Size>::Set(const T& v) {
pool[PRNG() % Size] = v;
set = true;
}
template <class T, size_t Size>
bool MutatorPool<T, Size>::Have(void) const {
return set;
}
template <class T, size_t Size>
T MutatorPool<T, Size>::Get(void) const {
return pool[PRNG() % Size];
}
MutatorPool<CurvePrivkey_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurvePrivkey;
MutatorPool<CurveKeypair_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveKeypair;
MutatorPool<CurveECDSASignature_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveECDSASignature;
MutatorPool<DSASignature, cryptofuzz::config::kMutatorPoolSize> Pool_DSASignature;
MutatorPool<CurveECCSISignature_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveECCSISignature;
MutatorPool<CurveECC_Point_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveECC_Point;
MutatorPool<CurveBLSSignature_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveBLSSignature;
MutatorPool<CurveBLSG1_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveBLSG1;
MutatorPool<CurveBLSG2_Pair, cryptofuzz::config::kMutatorPoolSize> Pool_CurveBLSG2;
MutatorPool<std::string, cryptofuzz::config::kMutatorPoolSize> Pool_Bignum;
MutatorPool<std::string, cryptofuzz::config::kMutatorPoolSize> Pool_Bignum_Primes;
MutatorPool<Fp12, cryptofuzz::config::kMutatorPoolSize> Pool_Fp12;
MutatorPool<BLS_BatchSignature_, cryptofuzz::config::kMutatorPoolSize> Pool_BLS_BatchSignature;
MutatorPool<std::string, cryptofuzz::config::kMutatorPoolSize> Pool_DH_PrivateKey;
MutatorPool<std::string, cryptofuzz::config::kMutatorPoolSize> Pool_DH_PublicKey;
MutatorPool<DSA_PQG, 8> Pool_DSA_PQG;
MutatorPool<type_DoubleString, 64> Pool_DSA_PubPriv;
template class MutatorPool<CurvePrivkey_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveKeypair_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveECDSASignature_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<DSASignature, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveECCSISignature_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveECC_Point_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveBLSSignature_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveBLSG1_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<CurveBLSG2_Pair, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<Fp12, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<BLS_BatchSignature_, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<std::string, cryptofuzz::config::kMutatorPoolSize>;
template class MutatorPool<DSA_PQG, 8>;
template class MutatorPool<type_DoubleString, 64>;