291
|
1 |
/*
|
|
2 |
* Portions Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* The original NIST Statistical Test Suite code is placed in public domain.
|
|
16 |
* (http://csrc.nist.gov/groups/ST/toolkit/rng/documentation_software.html)
|
|
17 |
*
|
|
18 |
* This software was developed at the National Institute of Standards and Technology by
|
|
19 |
* employees of the Federal Government in the course of their official duties. Pursuant
|
|
20 |
* to title 17 Section 105 of the United States Code this software is not subject to
|
|
21 |
* copyright protection and is in the public domain. The NIST Statistical Test Suite is
|
|
22 |
* an experimental system. NIST assumes no responsibility whatsoever for its use by other
|
|
23 |
* parties, and makes no guarantees, expressed or implied, about its quality, reliability,
|
|
24 |
* or any other characteristic. We would appreciate acknowledgment if the software is used.
|
|
25 |
*/
|
|
26 |
|
|
27 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
28 |
U T I L I T Y F U N C T I O N P R O T O T Y P E S
|
|
29 |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
30 |
#ifndef _UTILITIES_H_
|
|
31 |
#define _UTILITIES_H_
|
|
32 |
|
|
33 |
int displayGeneratorOptions();
|
|
34 |
int generatorOptions(char** streamFile);
|
|
35 |
void chooseTests();
|
|
36 |
void fixParameters();
|
|
37 |
void fileBasedBitStreams(char *streamFile);
|
|
38 |
void readBinaryDigitsInASCIIFormat(FILE *fp, char *streamFile);
|
|
39 |
void readHexDigitsInBinaryFormat(FILE *fp);
|
|
40 |
int convertToBits(const BYTE *x, int xBitLength, int bitsNeeded, int *num_0s, int *num_1s, int *bitsRead);
|
|
41 |
void openOutputStreams(int option);
|
|
42 |
void InitializeNISTSuiteL(int option);
|
|
43 |
void ReleaseResources();
|
|
44 |
void invokeTestSuite(int option, char *streamFile);
|
|
45 |
void nist_test_suite();
|
|
46 |
void GetNextTemplateItem(BitSequence aBitSequence[]);
|
|
47 |
|
|
48 |
|
|
49 |
extern CConsoleBase* gConsole;
|
|
50 |
extern TBuf8<KMaxFileName> gLogFilePath;
|
|
51 |
|
|
52 |
extern TInt gTemplateIndex;
|
|
53 |
|
|
54 |
const TInt KMaxBit = 32;
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
// inline functions
|
|
59 |
inline void ResetTemplateIndex()
|
|
60 |
{
|
|
61 |
gTemplateIndex = 1;
|
|
62 |
}
|
|
63 |
|
|
64 |
|
|
65 |
#endif // _UTILITIES_H_
|
|
66 |
|