Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Functions | Variables
test.cpp File Reference
#include "dll.h"
#include "aes.h"
#include "cryptlib.h"
#include "filters.h"
#include "md5.h"
#include "ripemd.h"
#include "rng.h"
#include "gzip.h"
#include "default.h"
#include "randpool.h"
#include "ida.h"
#include "base64.h"
#include "socketft.h"
#include "wait.h"
#include "factory.h"
#include "whrlpool.h"
#include "tiger.h"
#include "smartptr.h"
#include "ossig.h"
#include "trap.h"
#include "validate.h"
#include "bench.h"
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <locale>
#include <time.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
Include dependency graph for test.cpp:

Go to the source code of this file.

Macros

#define CRYPTOPP_DEFAULT_NO_DLL
 
#define CRYPTOPP_ENABLE_NAMESPACE_WEAK   1
 

Functions

void RegisterFactories ()
 
void PrintSeedAndThreads (const std::string &seed)
 
void GenerateRSAKey (unsigned int keyLength, const char *privFilename, const char *pubFilename, const char *seed)
 
string RSAEncryptString (const char *pubFilename, const char *seed, const char *message)
 
string RSADecryptString (const char *privFilename, const char *ciphertext)
 
void RSASignFile (const char *privFilename, const char *messageFilename, const char *signatureFilename)
 
bool RSAVerifyFile (const char *pubFilename, const char *messageFilename, const char *signatureFilename)
 
void DigestFile (const char *file)
 
void HmacFile (const char *hexKey, const char *file)
 
void AES_CTR_Encrypt (const char *hexKey, const char *hexIV, const char *infile, const char *outfile)
 
string EncryptString (const char *plaintext, const char *passPhrase)
 
string DecryptString (const char *ciphertext, const char *passPhrase)
 
void EncryptFile (const char *in, const char *out, const char *passPhrase)
 
void DecryptFile (const char *in, const char *out, const char *passPhrase)
 
void SecretShareFile (int threshold, int nShares, const char *filename, const char *seed)
 
void SecretRecoverFile (int threshold, const char *outFilename, char *const *inFilenames)
 
void InformationDisperseFile (int threshold, int nShares, const char *filename)
 
void InformationRecoverFile (int threshold, const char *outFilename, char *const *inFilenames)
 
void GzipFile (const char *in, const char *out, int deflate_level)
 
void GunzipFile (const char *in, const char *out)
 
void Base64Encode (const char *infile, const char *outfile)
 
void Base64Decode (const char *infile, const char *outfile)
 
void HexEncode (const char *infile, const char *outfile)
 
void HexDecode (const char *infile, const char *outfile)
 
void ForwardTcpPort (const char *sourcePort, const char *destinationHost, const char *destinationPort)
 
void FIPS140_SampleApplication ()
 
void FIPS140_GenerateRandomFiles ()
 
bool Validate (int, bool, const char *)
 
RandomNumberGeneratorGlobalRNG ()
 
int CRYPTOPP_API main (int argc, char *argv[])
 
template<class T , bool NON_NEGATIVE>
T StringToValue (const std::string &str)
 
template<>
int StringToValue< int, true > (const std::string &str)
 
SecByteBlock HexDecodeString (const char *hex)
 

Variables

const int MAX_PHRASE_LENGTH =250
 
int(* AdhocTest )(int argc, char *argv[]) = NULL
 

Macro Definition Documentation

#define CRYPTOPP_DEFAULT_NO_DLL

Definition at line 3 of file test.cpp.

#define CRYPTOPP_ENABLE_NAMESPACE_WEAK   1

Definition at line 4 of file test.cpp.

Function Documentation

void AES_CTR_Encrypt ( const char *  hexKey,
const char *  hexIV,
const char *  infile,
const char *  outfile 
)

Definition at line 605 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Base64Decode ( const char *  infile,
const char *  outfile 
)

Definition at line 798 of file test.cpp.

Here is the caller graph for this function:

void Base64Encode ( const char *  infile,
const char *  outfile 
)

Definition at line 793 of file test.cpp.

Here is the caller graph for this function:

void DecryptFile ( const char *  in,
const char *  out,
const char *  passPhrase 
)

Definition at line 640 of file test.cpp.

Here is the caller graph for this function:

string DecryptString ( const char *  ciphertext,
const char *  passPhrase 
)

Definition at line 624 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void DigestFile ( const char *  file)

Definition at line 557 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void EncryptFile ( const char *  in,
const char *  out,
const char *  passPhrase 
)

Definition at line 635 of file test.cpp.

Here is the caller graph for this function:

string EncryptString ( const char *  plaintext,
const char *  passPhrase 
)

Definition at line 613 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FIPS140_GenerateRandomFiles ( )

Definition at line 422 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FIPS140_SampleApplication ( )

Definition at line 12 of file dlltest.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ForwardTcpPort ( const char *  sourcePort,
const char *  destinationHost,
const char *  destinationPort 
)

Definition at line 813 of file test.cpp.

Here is the caller graph for this function:

void GenerateRSAKey ( unsigned int  keyLength,
const char *  privFilename,
const char *  pubFilename,
const char *  seed 
)

Definition at line 493 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

RandomNumberGenerator& GlobalRNG ( )

Definition at line 123 of file test.cpp.

Here is the caller graph for this function:

void GunzipFile ( const char *  in,
const char *  out 
)

Definition at line 788 of file test.cpp.

Here is the caller graph for this function:

void GzipFile ( const char *  in,
const char *  out,
int  deflate_level 
)

Definition at line 756 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HexDecode ( const char *  infile,
const char *  outfile 
)

Definition at line 808 of file test.cpp.

Here is the caller graph for this function:

SecByteBlock HexDecodeString ( const char *  hex)

Definition at line 485 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HexEncode ( const char *  infile,
const char *  outfile 
)

Definition at line 803 of file test.cpp.

Here is the caller graph for this function:

void HmacFile ( const char *  hexKey,
const char *  file 
)

Definition at line 588 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void InformationDisperseFile ( int  threshold,
int  nShares,
const char *  filename 
)

Definition at line 702 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void InformationRecoverFile ( int  threshold,
const char *  outFilename,
char *const *  inFilenames 
)

Definition at line 729 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int CRYPTOPP_API main ( int  argc,
char *  argv[] 
)

Definition at line 134 of file test.cpp.

Here is the call graph for this function:

void PrintSeedAndThreads ( const std::string &  seed)

Definition at line 470 of file test.cpp.

Here is the caller graph for this function:

void RegisterFactories ( )

Definition at line 71 of file regtest.cpp.

Here is the caller graph for this function:

string RSADecryptString ( const char *  privFilename,
const char *  ciphertext 
)

Definition at line 522 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string RSAEncryptString ( const char *  pubFilename,
const char *  seed,
const char *  message 
)

Definition at line 509 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void RSASignFile ( const char *  privFilename,
const char *  messageFilename,
const char *  signatureFilename 
)

Definition at line 532 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool RSAVerifyFile ( const char *  pubFilename,
const char *  messageFilename,
const char *  signatureFilename 
)

Definition at line 539 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SecretRecoverFile ( int  threshold,
const char *  outFilename,
char *const *  inFilenames 
)

Definition at line 675 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SecretShareFile ( int  threshold,
int  nShares,
const char *  filename,
const char *  seed 
)

Definition at line 645 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , bool NON_NEGATIVE>
T StringToValue ( const std::string &  str)

Definition at line 437 of file test.cpp.

template<>
int StringToValue< int, true > ( const std::string &  str)

Definition at line 458 of file test.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Validate ( int  alg,
bool  thorough,
const char *  seedInput 
)

Definition at line 884 of file test.cpp.

Here is the caller graph for this function:

Variable Documentation

int(* AdhocTest) (int argc, char *argv[]) = NULL

Definition at line 120 of file test.cpp.

const int MAX_PHRASE_LENGTH =250

Definition at line 76 of file test.cpp.