blob: c5692e38e16929ebec7f2519a124c0f43801a888 [file] [log] [blame]
Karl Zhang3de5ab12021-05-31 11:45:48 +08001/*
2 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8/*
9 * sec-regress.c&.h implement the Scripted-Call Application, and other functions
10 * for the security-regression testing feature.
11 *
12 */
13
14#ifndef GIBBERISH_HPP
15#define GIBBERISH_HPP
16
17#include <cstdlib>
18
19using namespace std;
20
21class gibberish
22{
23public: // not much value in hiding these behind getters and setters
24 // Data members:
25 static const int min_literal_data_len = 32, max_literal_data_len = 512,
26 literal_data_len_span = max_literal_data_len - min_literal_data_len;
27 // Methods:
28 gibberish (void); // (constructor)
29 ~gibberish (void);
30 char letter (void);
31 char vowel (void);
32 char consonant (void);
33 char *syllable (char *string_ptr, char *stop);
34 char *word (bool initial_cap, char *string_ptr, char *stop);
35 int pick_sentence_len (void);
36 void sentence (char *string_ptr, char *stop);
37
38protected:
39 // Data members:
40 // Methods:
41
42private:
43 // Data members:
44 static const int n_avoids = 42;
45 string avoid[n_avoids] = {"bvup", "epvcmf", "jou", "tusvdu", "dpotu", "gmpbu",
46 "tipsu", "votjhofe", "csfbl", "fmtf", "mpoh", "txjudi",
47 "gvdl", "dpoujovf", "gps", "wbhjob", "tjhofe", "dpdl",
48 "wpje", "dbtf", "tiju", "fovn", "qfojt", "sfhjtufs",
49 "qjtt", "uzqfefg", "efgbvmu", "ujut", "hpup", "tj{fpg",
50 "uxbu", "wpmbujmf", "dvou", "dibs", "fyufso", "sfuvso",
51 "dpjuvt", "vojpo", "ep", "jg", "tubujd", "xijmf"};
52 static const bool capitalize = true;
53 static const bool dont_capitalize = false;
54 // Parameters of random SST-asset generation:
55 // Methods:
56};
57
58#endif /* GIBBERISH_HPP */