#include <SPUtil.h>
Static Public Member Functions | |
| int | char62code2num (char c) |
| int | num2char62code (int x) |
| string | rippleadd1 (string inputstring) |
| string | char62circadd (string str1, string str2) |
| string | char62circsub (string str1, string str2) |
| int | SPsmoothValue (int sampleSize, int seed, vector< int > keyArray) |
| string | INTdelimiter () |
| string | MESSdelimiter () |
| string | INTMESSdelimiter () |
| string | vectorToString (vector< string > v, const string delim) |
| string | StringArrToString (vector< string > sa, string delim) |
| vector< string > | StringArrAddEl (vector< string > sa, string str) |
| vector< int > | IntArrAddEl (vector< int > iarr, int i) |
| vector< int > | arrSplice (vector< int > iarr, int pos) |
| vector< string > | StringArrAddArr (vector< string > sa1, vector< string > sa2) |
| vector< string > | ByteArrToStringArr (vector< byte > bt) |
| vector< byte > | StringArrToByteArr (vector< string > strarr) |
| vector< string > | StringToStringArr (string str, string del) |
| int | toInt (const char *str) |
| string | toString (int i) |
| vector< string > | StringArrRemoveEl (vector< string > sa, string str) |
| string | BinaryToString (vector< byte > digest) |
| vector< byte > | StringToBinary (string str) |
| int | StringToInt (const char *str) |
| int | HexStringToInt (const string hexStg) |
| string | IntToString (int i) |
| string | IntToString (int i, int hexdec) |
| vector< byte > | ByteArrAddEl (vector< byte > sa, byte str) |
| vector< byte > | ByteArrAddArr (vector< byte > sa1, vector< byte > sa2) |
| vector< byte > | IntToByte (int i) |
| vector< byte > | subByteArr (vector< byte > inbArr, int start, int end) |
| bool | arrComp (vector< byte > b1, vector< byte > b2) |
| vector< string > | addVectorToVector (vector< string > sa1, vector< string > sa2) |
| vector< string > | VectorToStringArr (vector< string > v) |
| vector< string > | StringArrToVector (vector< string > strArr) |
| vector< string > | StringArrGETsubArr (vector< string > strArr, int indexStart, int indexEnd) |
| vector< byte > | ByteArrGETsubArr (vector< byte > strArr, int indexStart, int indexEnd) |
| string | LongToString (long i) |
| long | StringToLong (string str) |
| bool | compareStringArrays (vector< string > str1, vector< string > str2) |
| map< string, SPAbstractTransactionInterface * > * | getTransactionRegistry () |
| bool | SPUregisterTransaction (string transName, SPAbstractTransactionInterface *transInstance) |
| vector< string > | viewRegisteredTransaction () |
| SPAbstractTransactionInterface * | getRegisteredTransaction (string key) |
| string | SPgenerateKey (int keySize) |
| string | SPtransform (string input, string gameid) |
| vector< byte > | getHashText (string plainText, string algorithm) |
| string | byteArrtoString (vector< byte > bt) |
| string | toUpper (string str) |
| string | BoolToString (bool b) |
| string | PrivateToString (SPUEPrivatePolicy p) |
| vector< byte > | getBytes (string s) |
Static Public Attributes | |
| string | INTERNAL_COMMS = "internal" |
| int | SP_ID_SIZE = 12 |
| int | SP_KEY_SIZE = 25 |
| int | SP_UPDATE_INTERVAL = 380 |
| string | SP_TESTSEGMENT = "THISISANONCOMMERCIALONLYSECUREPLAYLICENSEAAAAAAAAAA" |
| string | intDel = ":" |
| string | messDel = ";" |
| string | interMessDell = "~" |
| bool | RULESLOOPBACK = true |
Static Private Attributes | |
| map< string, SPAbstractTransactionInterface * > | transactionRegistry = *(new map<string, SPAbstractTransactionInterface*>()) |
|
||||||||||||
|
This method adds two vectors together.
|
|
||||||||||||
|
This method compares two byte arrays.
|
|
||||||||||||
|
Returns a new array that removes a single element from the input Integer array at a given position
|
|
|
This method convets a byte array to a string.
|
|
|
This function returns a string representation of a boolean. |
|
||||||||||||
|
This method add two byte arrays together.
|
|
||||||||||||
|
This function appends a byte element to the end of the byte array.
|
|
||||||||||||||||
|
This method gets the sub array of a Stirng array.
|
|
|
|
|
|
Converts byte array into string array.
|
|
||||||||||||
|
This function does a circular, character by character addition mod 62 assuming the strings are "right justified". This returns the result as a new string.
|
|
||||||||||||
|
This function does a circular, character by character subtraction mod 62 assuming the strings are "right justified" this returns the result as a new string.
|
|
|
This function takes the character code provided and converts it to a number between 0 and 61
|
|
||||||||||||
|
Compares two string arrays if they contain identical items. The order does not matter, just as long as they contain number and same strings.
|
|
|
This function returns the byte array representation of the string passed in. NOTE: Please note there may be some issues with this function for UNICODE strings.
|
|
||||||||||||
|
This method gets the hashed string
|
|
|
This method gets a registered Transaction object from the register list and returns it to the user.
|
|
|
This method returns the transaction registry list. It is set to private because no one should be able to edit it.
|
|
|
This function converts a hexidecimal string to an int. |
|
||||||||||||
|
This function appends a integer element to the end of the integer array.
|
|
|
Returns a String delimiter1 Delimiter1 = ":" Used for serializing internal message arrays
|
|
|
Returns a String delimiter3 Delimiter3 = "~" Used for serialising multiple messages
|
|
|
This method converts an integer into a byte array.
|
|
||||||||||||
|
Integer to String.
|
|
|
Integer to String.
|
|
|
Long to String.
|
|
|
Returns a String delmiter2 Delimiter2 = ";" Used for serializing the message
|
|
|
this function takes a numerical value between 0 and 61 and converts it to a character code from 0..9A..Za..z
|
|
|
This function returns a string representation of the PrivacyPolicy.
|
|
|
This function adds 1 to the low order character of a string. It returns the result as a returned string value the input string is from the range - 0..9A..Za..z.
|
|
|
This function generates a "real" random key that is easily stored in a printable string. THIS FUNCTION SHOULD NOT BE USED FOR PRODUCTION GAMES. PLEASE USE A REAL RANDOM TOOL. THIS FUNCTION IS PROVIDED AS A SAMPLE ONLY
|
|
||||||||||||||||
|
This is a somewhat smooth, keyed, pseudorandom number generator. It generates a result between 0 and SampleSize -1. It uses the seed to generate a range of possible outcomes and it is driven by an array keyArray. THIS FUNCTION SHOULD NOT BE USED FOR PRODUCTION GAMES. CAREFUL SELECTION OF PSEUDO-RANDOM NUMBER GENERATORS IS CRITICAL.
|
|
||||||||||||
|
This function performs an irreversible transform on an input string to generate an output string. The sample implementation uses MD5. This method can be overridden and should be reviewed for security purposes prior to use in a production implementation.
|
|
||||||||||||
|
This method registers Transaction objects with so that they can be used in this library.
|
|
||||||||||||
|
This method add two string arrays together.
|
|
||||||||||||
|
This function appends a string element to the end of the String array.
|
|
||||||||||||||||
|
This method gets the sub array of a Stirng array.
|
|
||||||||||||
|
This function removes a string element froma a String array.
|
|
|
This method converts a String array to a byte array.
|
|
||||||||||||
|
Parces the string array into a string with delimiters separating each array indexes
|
|
|
This method converts a string array to a vector.
|
|
|
String to binary
|
|
|
String to integer.
|
|
|
String to Long.
|
|
||||||||||||
|
This method converts a string to a string array using the specified delimiter.
|
|
||||||||||||||||
|
This method retrieves the specified sub array of a byte array passed in.
|
|
|
Converts a string representaion of an integer to Integer class.
|
|
|
Converts an integer to string.
|
|
|
|
|
||||||||||||
|
Concatinates the objects in a Vector into a string using a delimiter.
|
|
|
This method converts a Vector to a string array.
|
|
|
This method allows users to see what transactions have been registered.
|
|
|
Delimiter1 = : Used for serializing internal message arrays |
|
|
Delimeter3 = ~ Used for serializing multiple messages |
|
|
Comms internal |
|
|
Delimiter2 = ; Used for serializing the message |
|
|
This should be set to FALSE for production systems or all "rulesXXXX methods should be edited |
|
|
used to set the default size of generated IDs - default is 12 |
|
|
This parameter is used to set game key size. Default is 25. |
|
|
This Constant is used to generate a Game Segment ID for sample code. |
|
|
This parameter is used to force an update check - only necessary for polling communications. Default is 3800. |
|
|
Varialbe that stores all the registered transactions |