Topics
:Overview
Constants
Type Definitions
Data Members
Functions
The EDS (Encrypted Data Set) class is used to generate encrypted character strings. An encrypted string is a numerical array derived from an encryption table. Each array element represents discrete characters in the string and can only be decoded by matching encryption tables.
EDS version 201 generates platform interoperable encrypted data sets for use in cross-platform communication applications. The eds2String class uses dynamic encryption tables allowing tables to be regenerated any time during program execution. EDS 201 encryption tables are generated using a magic number supplied by the application. A magic number is a polynomial ranging from 1024 to 65535. Table values are calculated by a byte-wise 16-bit operation based on the magic number. The eds2String class maps each character in a string to a table value and provides methods to encrypt and decrypt strings.
const eds2MagicNumber_t eds2MagicNumber = 34881; // Default magic number const unsigned eds2TableSize = 256; // Size of EDS tables const unsigned eds2MaxLine = 255; // Max chars per line const eds2WORD eds2EOT = (gxUINT16)0x0000; // End of text marker const double eds2VersionNumber = 4000.101; // Current version number
eds2WORD - Data type used for encrypted characters.
eds2WORD_t - Native type used for encrypted characters.
eds2MagicNumber_t - Magic number native type.
eds2WORD eds2String::eds2_magic_number
- EDS2 magic number use to encrypt strings.eds2WORD eds2String::eds2_table[eds2TableSize]
- EDS2 Dynamic table.eds2String::eds2String()
eds2String::~eds2String()
eds2String::DecryptString()
eds2String::EncryptString()
eds2String::InitDynamicTable()
eds2String::eds2Copy()
eds2String::eds2String(eds2MagicNumber_t magic_num = eds2MagicNumber)
- Class constructor used to construct an eds2String object and generate and encryption table based on the magic number.eds2String::eds2String(const eds2String &ob)
- Class copy constructor.eds2String eds2String::operator=(const eds2String &ob)
- Assignment operator. - Class destructor.int eds2String::DecryptString(eds2WORD val, unsigned char &c)
- Public member function used to decrypt the specified value and pass back the character in "c." Returns false if the encrypted value is not found in the encryption table.eds2WORD eds2String::EncryptString(unsigned char c)
- Public member function that returns a encrypted value for the specified character.void eds2String::InitDynamicTable(eds2MagicNumber_t magic_num = eds2MagicNumber)
- Public member function used to initialize the dynamic magic number table. The dynamic table allows applications to change the encryption codes as the program is running. Table values are calculated by a byte-wise 16-bit operation based on a specified polynomial. NOTE: In this representation the coefficient of x^0 is stored in the MSB of the 16-bit word and the coefficient of x^15 is stored in the LSB.void eds2String::eds2Copy(const eds2String &ob)
- Public member function used to copy eds2String objects.
End Of Document |