Skip to main content

com.eruces.teagent.TEAgentMatrix

The TEAgentMatrix class encrypts and decrypts matrix data.

Inheritance

Public Member Functions

MemberDescription
TEAgentMatrix()The TEAgentMatrix constructor is the default constructor for the TEAgentMatrix class.
void setRawElement(byte[] strValue, int nRow, int nCol)The setRawElement method sets a byte array into an element in a matrix.
byte[] getRawElement(int nRow, int nCol)The getRawElement method gets a byte array from an element from a matrix.
void setElement(String strValue, int nRow, int nCol)The setElement method sets a Base64-encoded string into an element in a matrix.
String getElement(int nRow, int nCol)The getElement method gets a Base64-encoded data from an element in a matrix.
void setRawHiddenLink(byte[] strHiddenLink, int nRow)The setRawHiddenLink method sets a byte array of a TTag into a matrix.
byte[] getRawHiddenLink(int nRow)The getRawHiddenLink method gets a byte array of a TTag from matrix.
void setHiddenLink(String strHiddenLink, int nRow)The setHiddenLink method sets a Base64-encoded TTag into a matrix.
String getHiddenLink(int nRow)The getHiddenLink method gets a Base64-encoded TTag from a matrix.
int getRowCount()The getRowCount method gets the number of rows in a matrix.
int getColCount()The getColCount method gets the number of columns in a matrix.
void setHashColumns(TreeMap mapHashColumns)
TreeMap getHashColumns()The getHashColumns method gets a hash map of hashed columns and salt values, set in pairs.
String getHashElement(int nRow, int nCol, String strSalt)The getHashElement method gets an encoded hashed value from a specific element in a matrix.
byte[] getRawHashElement(int nRow, int nCol, byte[] byteSalt)The getRawHashElement method gets an unencoded hashed value from a specific element in a matrix.

Member Function Documentation

TEAgentMatrix()

The TEAgentMatrix constructor is the default constructor for the TEAgentMatrix class.

void setRawElement(byte[] strValue, int nRow, int nCol)

The setRawElement method sets a byte array into an element in a matrix.

Parameters

ParameterDescription
strValueA byte array representing the value of the data.
nRowAn integer representing the number of the row that will contain the data.
nColAn integer representing the number of the column that will contain the data.

byte[] getRawElement(int nRow, int nCol)

The getRawElement method gets a byte array from an element from a matrix.

Parameters

ParameterDescription
nRowAn integer representing the number of the row that will contain the data.
nColAn integer representing the number of the column that will contain the data.

Returns: Returns a byte array representing the value of the data.

void setElement(String strValue, int nRow, int nCol)

The setElement method sets a Base64-encoded string into an element in a matrix.

Parameters

ParameterDescription
strValueA Base64-encoded string representing value of the data.
nRowAn integer representing the number of the row that will contain the data.
nColAn integer representing the number of the column that will contain the data.

String getElement(int nRow, int nCol)

The getElement method gets a Base64-encoded data from an element in a matrix.

Parameters

ParameterDescription
nRowAn integer representing the number of the row that will contain the data.
nColAn integer representing the number of the column that will contain the data.

Returns: Returns a string representing the Base64-encoded data.

The setRawHiddenLink method sets a byte array of a TTag into a matrix.

Parameters

ParameterDescription
strHiddenLinkA byte array representing the TTag.
nRowAn integer representing the number of the row that will contain the TTag.

byte[] getRawHiddenLink(int nRow)

The getRawHiddenLink method gets a byte array of a TTag from matrix.

Parameters

ParameterDescription
nRowAn integer representing the number of the row that contains the TTag.

Returns: Returns a byte array representing the TTag.

The setHiddenLink method sets a Base64-encoded TTag into a matrix.

Parameters

ParameterDescription
strHiddenLinkA string representing the TTag.
nRowAn integer representing the number of the row that will contain the TTag.

String getHiddenLink(int nRow)

The getHiddenLink method gets a Base64-encoded TTag from a matrix.

Parameters

ParameterDescription
nRowAn integer representing the number of the row that contains the TTag.

Returns: Returns a string representing a Base64-encoded TTag.

int getRowCount()

The getRowCount method gets the number of rows in a matrix.

Returns: Returns an integer representing the number of rows in a matrix.

int getColCount()

The getColCount method gets the number of columns in a matrix.

Returns: Returns an integer representing the number of columns in a matrix.

void setHashColumns(TreeMap mapHashColumns)

The setHashColumns method sets specific columns to be hashed and the salt needed to do so. Set hash columns. Elements in set must be an integer, byte array pair.

Parameters

ParameterDescription
mapHashColumnsA hash map containing column numbers and salt values. Try: TreeMap<Integer, byte[]> mapHashColumns = new TreeMap<Integer, byte[]>()

Returns: setHashColumns set of hash columns with salt value

Remark: The elements must be set in pairs.

TreeMap getHashColumns()

The getHashColumns method gets a hash map of hashed columns and salt values, set in pairs.

Returns: Returns a hash map representing the columns and the salt used for hashing.

String getHashElement(int nRow, int nCol, String strSalt)

The getHashElement method gets an encoded hashed value from a specific element in a matrix.

Hashing is SHA-256 (performHash v2); v1 outputs do not match and have no compatibility mode.

Parameters

ParameterDescription
nRowAn integer representing the number of the row containing the hashed value.
nColAn integer representing the number of the column containing the hashed value.
strSaltAn string representing the salt used for hashing.

Returns: Returns a string representing the columns and the salt used for hashing.

byte[] getRawHashElement(int nRow, int nCol, byte[] byteSalt)

The getRawHashElement method gets an unencoded hashed value from a specific element in a matrix.

Hashing is SHA-256 (performHash v2); v1 outputs do not match and have no compatibility mode.

Parameters

ParameterDescription
nRowAn integer representing the number of the row containing the hashed value.
nColAn integer representing the number of the column containing the hashed value.
byteSaltAn byte array representing the salt used for hashing.

Returns: Returns a byte array representing the columns and the salt used for hashing.