blob: 533f23928cc54990aa8e74fe0aae2fb16796d056 [file] [log] [blame]
Karl Zhang3de5ab12021-05-31 11:45:48 +08001/*
Nik Dewallybacae6c2024-07-30 16:58:14 +01002 * Copyright (c) 2019-2024, Arm Limited. All rights reserved.
Karl Zhang3de5ab12021-05-31 11:45:48 +08003 *
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>
Nik Dewallybacae6c2024-07-30 16:58:14 +010018#include <string>
Karl Zhang3de5ab12021-05-31 11:45:48 +080019
20using namespace std;
21
22class gibberish
23{
24public: // not much value in hiding these behind getters and setters
25 // Data members:
26 static const int min_literal_data_len = 32, max_literal_data_len = 512,
27 literal_data_len_span = max_literal_data_len - min_literal_data_len;
28 // Methods:
29 gibberish (void); // (constructor)
30 ~gibberish (void);
31 char letter (void);
32 char vowel (void);
33 char consonant (void);
34 char *syllable (char *string_ptr, char *stop);
35 char *word (bool initial_cap, char *string_ptr, char *stop);
36 int pick_sentence_len (void);
37 void sentence (char *string_ptr, char *stop);
38
39protected:
40 // Data members:
41 // Methods:
42
43private:
44 // Data members:
45 static const int n_avoids = 42;
46 string avoid[n_avoids] = {"bvup", "epvcmf", "jou", "tusvdu", "dpotu", "gmpbu",
47 "tipsu", "votjhofe", "csfbl", "fmtf", "mpoh", "txjudi",
48 "gvdl", "dpoujovf", "gps", "wbhjob", "tjhofe", "dpdl",
49 "wpje", "dbtf", "tiju", "fovn", "qfojt", "sfhjtufs",
50 "qjtt", "uzqfefg", "efgbvmu", "ujut", "hpup", "tj{fpg",
51 "uxbu", "wpmbujmf", "dvou", "dibs", "fyufso", "sfuvso",
52 "dpjuvt", "vojpo", "ep", "jg", "tubujd", "xijmf"};
53 static const bool capitalize = true;
54 static const bool dont_capitalize = false;
55 // Parameters of random SST-asset generation:
56 // Methods:
57};
58
59#endif /* GIBBERISH_HPP */