ABY Framework
1.0
Arithmetic Bool Yao Framework
|
#include <cbitvector.h>
Public Member Functions | |
CBitVector () | |
CBitVector (uint32_t bits) | |
CBitVector (uint32_t bits, crypto *crypt) | |
void | Init () |
~CBitVector () | |
void | delCBitVector () |
void | FillRand (uint32_t bits, crypto *crypt) |
void | Create (uint64_t bits) |
void | CreateBytes (uint64_t bytes) |
void | CreateZeros (uint64_t bits) |
void | Create (uint64_t bits, crypto *crypt) |
void | Create (uint64_t numelements, uint64_t elementlength) |
void | Create (uint64_t numelements, uint64_t elementlength, crypto *crypt) |
void | Create (uint64_t numelementsDimA, uint64_t numelementsDimB, uint64_t elementlength) |
void | Create (uint64_t numelementsDimA, uint64_t numelementsDimB, uint64_t elementlength, crypto *crypt) |
void | ResizeinBytes (int newSizeBytes) |
void | Reset () |
void | ResetFromTo (int frombyte, int tobyte) |
void | SetToOne () |
int | GetSize () |
BOOL | IsEqual (CBitVector &vec) |
BOOL | IsEqual (CBitVector &vec, int from, int to) |
void | SetElementLength (int elelen) |
uint64_t | GetElementLength () |
void | Copy (CBitVector &vec) |
void | Copy (CBitVector &vec, int pos, int len) |
void | Copy (BYTE *p, int pos, int len) |
void | XOR_no_mask (int p, int bitPos, int bitLen) |
unsigned int | GetInt (int bitPos, int bitLen) |
void | ORByte (int pos, BYTE p) |
BYTE | GetBit (int idx) |
void | SetBit (int idx, BYTE b) |
void | XORBit (int idx, BYTE b) |
void | ANDBit (int idx, BYTE b) |
BYTE | GetBitNoMask (int idx) |
void | SetBitNoMask (int idx, BYTE b) |
void | XORBitNoMask (int idx, BYTE b) |
void | ANDBitNoMask (int idx, BYTE b) |
void | SetByte (int idx, BYTE p) |
BYTE | GetByte (int idx) |
void | XORByte (int idx, BYTE b) |
void | ANDByte (int idx, BYTE b) |
void | GetBits (BYTE *p, int pos, int len) |
void | GetBytes (BYTE *p, int pos, int len) |
template<class T > | |
void | GetBytes (T *dst, T *src, T *lim) |
template<class T > | |
T | Get (int pos, int len) |
void | SetBits (BYTE *p, uint64_t pos, uint64_t len) |
void | SetBits (BYTE *p, int pos, int len) |
void | SetBitsPosOffset (BYTE *p, int ppos, int pos, int len) |
void | SetBytes (BYTE *p, int pos, int len) |
template<class T > | |
void | SetBytes (T *dst, T *src, T *lim) |
template<class T > | |
void | Set (T val, int pos, int len) |
void | SetBitsToZero (int bitpos, int bitlen) |
void | XORBytes (BYTE *p, int pos, int len) |
void | XORBytes (BYTE *p, int len) |
void | XORVector (CBitVector &vec, int pos, int len) |
template<class T > | |
void | XOR (T val, int pos, int len) |
void | XORBits (BYTE *p, int pos, int len) |
void | XORBitsPosOffset (BYTE *p, int ppos, int pos, int len) |
template<class T > | |
void | XORBytes (T *dst, T *src, T *lim) |
void | XORRepeat (BYTE *p, int pos, int len, int num) |
void | XORBytesReverse (BYTE *p, int pos, int len) |
void | ANDBytes (BYTE *p, int pos, int len) |
template<class T > | |
void | ANDBytes (T *dst, T *src, T *lim) |
void | SetXOR (BYTE *p, BYTE *q, int pos, int len) |
void | SetAND (BYTE *p, BYTE *q, int pos, int len) |
BYTE * | GetArr () |
void | AttachBuf (BYTE *p, int size=-1) |
void | AttachBuf (BYTE *p, uint64_t size=-1) |
void | DetachBuf () |
void | Print (int fromBit, int toBit) |
void | PrintHex () |
void | PrintHex (int fromByte, int toByte) |
void | PrintBinary () |
void | PrintContent () |
void | PrintBinaryMasked (int from, int to) |
template<class T > | |
T | Get (int i) |
template<class T > | |
void | Set (T val, int i) |
template<class T > | |
T | Get2D (int i, int j) |
template<class T > | |
void | Set2D (T val, int i, int j) |
void | EklundhBitTranspose (int rows, int columns) |
void | SimpleTranspose (int rows, int columns) |
Class which defines the functionality of storing C-based Bits in vector type format.
|
inline |
Constructor which initializes the member variables bit pointer and size to NULL and zero respectively.
|
inline |
Overloaded constructor of class CBitVector which calls internally Create(uint64_t bits)
bits | - It is the number of bits which will be used to allocate the CBitVector with. For more info on how these bits are allocated refer to Create(uint64_t bits) |
|
inline |
Overloaded constructor of class CBitVector which calls internally Create(uint64_t bits,crypto* crypt)
bits | - It is the number of bits which will be used to allocate the CBitVector with. For more info on how these bits are allocated refer to Create(uint64_t bits,crypto* crypt) |
crypt | - This object from crypto class is used to generate pseudo random values for the cbitvector. |
|
inline |
Destructor which internally calls the delCBitVector for deallocating the space. This method internally calls delCBitVector().
|
inline |
This method ANDs the bit in the provided index by using the maskbits and the provided bit. The maskbits brings the concept of endianness in the vector. In this method C_MASK_BIT is used to extract and set the bits which are assumed to be organized in Little Endian form.
idx | - Bit Index which needs to be ANDed to in the CBitVector. |
b | - The bit which being ANDed in the provided index. |
|
inline |
This method ANDs the bit in the provided index without using the maskbits. The maskbits brings the concept of endianness in the vector. In this method mask bits are not used so the vector is treated in Big Endian form.
idx | - Bit Index which needs to be ANDed to in the CBitVector. |
b | - The bit which being ANDed in the provided index. |
|
inline |
This method performs AND operation at the given index in the CBitVector with a provided Byte.
idx | - Index of the byte which needs to be ANDed inside the CBitVector. |
b | - Byte to be ANDed with the CBitVector. |
void CBitVector::ANDBytes | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
This method performs AND operation from a given position in the CBitVector with a provided Byte Array with a length. This method internally calls ANDBytes(T* dst, T* src, T* lim).
p | - Byte Array to be ANDed with the CBitVector range. |
pos | - Positional offset for ANDing into current CBitVector. |
len | - Length or amount of values to be ANDed to the current vector from provided byte location. |
void CBitVector::ANDBytes | ( | T * | dst, |
T * | src, | ||
T * | lim | ||
) |
Generic method which is used to AND byte wise the CBitVector. This method is called from ANDBytes(BYTE* p, int pos, int len).
|
inline |
This method is used to attach a new buffer into the CBitVector provided as arguments to this method.
p | - Pointer to the byte location to be attached to the CBitVector. |
size | - Number of bytes attached from the provided buffer. |
|
inline |
This method is used to attach a new buffer into the CBitVector provided as arguments to this method.
p | - Pointer to the byte location to be attached to the CBitVector. |
size | - Number of bytes attached from the provided buffer. |
|
inline |
This method is used to copy the provided CBitVector to itself. It internally calls Copy(BYTE* p, int pos, int len) for copying bytewise.
vec | - The vector from which the copying needs to be performed. |
|
inline |
This method is used to copy the provided CBitVector to itself for a given range. It internally calls Copy(BYTE* p, int pos, int len) for copying bytewise. Copying is done in a slightly different way. Here the range is pos and len. The offset is defined for the base vector and not for the copying vector. So if the method is called as B.Copy(A,5,10) then, values of vector A will be copied from first index location for length 10 to the vector B from position 5 for length 10. Unlike copying values from 5 position in vector A to vector B for length 10.
vec | - The vector from which the copying needs to be performed. |
pos | - The positional offset for copying into current vector. |
len | - Length or amount of values to be copied to the current vector from provided vector. |
void CBitVector::Copy | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
This method is used to copy the current CBitVector with some ByteLocation with positional shift and length. This method is the base method for methods Copy(CBitVector& vec, int pos, int len) and Copy(CBitVector& vec).
p | - Pointer to the byte location to be copied to the CBitVector. |
pos | - Positional offset for copying into current CBitVector. |
len | - Length or amount of values to be copied to the current vector from provided byte location. |
void CBitVector::Create | ( | uint64_t | bits | ) |
This method is used to create the CBitVector with the provided bits. The method creates a bit vector with a size close to AES Bitsize. For example, if bit size provided is 110. After this method is called it will be 128 bits. It will perform a ceil of provided_bit_size to AES bit size and multiply that ceiled value with AES bits size. (For reference, AES Bit size is taken as 128 bits)
bits | - It is the number of bits which will be used to allocate the CBitVector with. |
void CBitVector::Create | ( | uint64_t | bits, |
crypto * | crypt | ||
) |
This method is used to create the CBitVector with the provided bits and set them to some random values. The method creates a bit vector with a size close to AES Bitsize. And performs an assignment of random values to each bit being allocated. Internally, this method calls Create(uint64_t bits) and FillRand(uint32_t bits, crypto* crypt). Therefore, for further info please refer to the internal method provided.
bits | - It is the number of bits which will be used to allocate and assign random values of the CBitVector with. |
crypt | - It is the crypto class object which is used to generate random values for the bit size. |
void CBitVector::Create | ( | uint64_t | numelements, |
uint64_t | elementlength | ||
) |
This method is used create the CBitVector with the provided number of elements and element length. This method basically creates a 1-dimensional array/vector with the provided element size and number of elements. This method internally calls Create(uint64_t bits) with arguments as elementlength*numelements.
numelements | - The number of elements in the 1-dimensional array/vector which gets created. |
elementlength | - The size of element in the provided cbitvector. |
void CBitVector::Create | ( | uint64_t | numelements, |
uint64_t | elementlength, | ||
crypto * | crypt | ||
) |
This method is used create the CBitVector with the provided number of elements and element length and then assign random values to them. This method basically creates a 1-dimensional array/vector with the provided element size and number of elements and assign some random values based on crypt object provided. This method internally calls Create(uint64_t bits, crypto* crypt) for creation of 1-d vector.
numelements | - The number of elements in the 1-dimensional array/vector which gets created. |
elementlength | - The size of element in the provided cbitvector. |
crypt | - It is the crypto class object which is used to generate random values for the provided bit size. |
void CBitVector::Create | ( | uint64_t | numelementsDimA, |
uint64_t | numelementsDimB, | ||
uint64_t | elementlength | ||
) |
This method is used create the CBitVector with the provided number of elements of 2 dimensions and element length. This method basically creates a 2-dimensional array/vector with the provided element size and number of elements in two dimensions. This method internally calls Create(uint64_t bits) with arguments as elementlength*numelementsDimA*numelementsDimB.
numelementsDimA | - The number of elements in the 1st-dimension of the 2d array/vector which gets created. |
numelementsDimB | - The number of elements in the 2nd-dimension of the 2d array/vector which gets created. |
elementlength | - The size of element in the provided cbitvector. |
void CBitVector::Create | ( | uint64_t | numelementsDimA, |
uint64_t | numelementsDimB, | ||
uint64_t | elementlength, | ||
crypto * | crypt | ||
) |
This method is used create the CBitVector with the provided number of elements of 2 dimensions and element length, and then assign random values to them. This method basically creates a 2-dimensional array/vector with the provided element size and number of elements in two dimensions and assign some random values based on crypt object provided. This method internally calls Create(uint64_t bits, crypto* crypt).
numelementsDimA | - The number of elements in the 1st-dimension of the 2d array/vector which gets created. |
numelementsDimB | - The number of elements in the 2nd-dimension of the 2d array/vector which gets created. |
elementlength | - The size of element in the provided cbitvector. |
crypt | - It is the crypto class object which is used to generate random values for the provided bit size. |
|
inline |
This method is used to create the CBitVector with the provided byte size. The method creates a bit vector with a size close to AES Bytesize. For example, if byte size provided is 9. After this method is called it will be 16 bytes. It will perform a ceil of provided_byte_size to AES byte size and multiply that ceiled value with AES byte size. (For reference, AES Byte size is taken as 16 bytes). Internally, this method calls Create(uint64_t bits). Therefore, for further info please refer to the internal method provided.
bits | - It is the number of bits which will be used to allocate the CBitVector with. |
|
inline |
This method is used to create the CBitVector with the provided bits and set them to value zero. The method creates a bit vector with a size close to AES Bitsize. And performs an assignment of zero to each bit being allocated. Internally, this method calls Create(uint64_t bits). Therefore, for further info please refer to the internal method provided.
bits | - It is the number of bits which will be used to allocate and assign zero values of the CBitVector with. |
|
inline |
This method is used to deallocate the bit pointer and size explicitly. This method needs to be called by the programmer explicitly.
|
inline |
This method is used to detach the buffer from the CBitVector.
void CBitVector::FillRand | ( | uint32_t | bits, |
crypto * | crypt | ||
) |
This method generates random values and assigns it to the bitvector using crypto object. If the bits provided in the params are greater than the bit size of the bitvector, then the bit vector is recreated with new bit size and filled in with random values.
bits | - It is the number of bits which will be used to allocate and assign random values of the CBitVector with. For more info on how these bits are allocated refer to Create(uint64_t bits) |
crypt | - It is the crypto class object which is used to generate random values for the bit size. |
|
inline |
Generic method which performs the operation of getting values from a CBitVector for a given bit position and length. This method internally calls GetBits(BYTE* p, int pos, int len).
pos | - The positional offset in the CBitVector from which the data needs to obtained. |
len | - The range limit of obtaining the data from the CBitVector. |
|
inline |
Generic method which provides more abstraction for getting elements in the CBitVector. It is mainly used for getting values which are 1-dimensional in nature. This method internally calls Get(int pos, int len).
i | - Index from which data needs to be fetched. |
|
inline |
Generic method which provides more abstraction for getting elements in the CBitVector. It is mainly used for getting values which are 2-dimensional in nature. This method internally calls Get(int pos, int len).
i | - Row index from which the data needs to be read. |
j | - Column index from which the data needs to be read. |
|
inline |
This method returns CBitVector in byte array format. This is very widely used method.
|
inline |
This method gets the bit in the provided index by using the maskbits. The maskbits brings the concept of endianness in the vector. In this method MASK_BIT is used to extract the bits which are assumed to be organized in Little Endian form.
idx | - Bit Index which needs to be fetched from the CBitVector. |
|
inline |
This method gets the bit in the provided index without using the maskbits. The maskbits brings the concept of endianness in the vector. In this method mask bits are not used so the vector is treated in Big Endian form.
idx | - Bit Index which needs to be fetched from the CBitVector. |
void CBitVector::GetBits | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
This method gets elements from the CBitVector bitwise from a given offset for a given length. And stores the result in the provided byte pointer. This method is used by the generic method Get(int pos, int len)
p | - The resulting bits for the given range in the CBitVector is stored in the byte pointer p. |
pos | - The positional offset in the CBitVector from which the data needs to obtained. |
len | - The range limit of obtaining the data from the CBitVector. |
|
inline |
This method returns the byte at the given index in the CBitVector. Here the index is w.r.t bytes.
idx | - Index of the byte which needs to be returned from the CBitVector. |
void CBitVector::GetBytes | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
This method gets elements from the CBitVector bytewise from a given offset for a given length. And stores the result in the provided byte pointer.
p | - The resulting bits for the given range in the CBitVector is stored in the byte pointer p. |
pos | - The positional offset in the CBitVector from which the data needs to obtained. |
len | - The range limit of obtaining the data from the CBitVector. |
void CBitVector::GetBytes | ( | T * | dst, |
T * | src, | ||
T * | lim | ||
) |
Generic method which performs the operation of getting bytes from source for the given limit.
|
inline |
This method gets the element length of the CBitVector.
unsigned int CBitVector::GetInt | ( | int | bitPos, |
int | bitLen | ||
) |
Deprecated
|
inline |
This is a getter method which returns the size of the CBitVector in bytes.
|
inline |
Function which gets called initially when the cbitvector object is created. This method is mostly called from constructor of CBitVector class. The method sets bit pointer and size to NULL and zero respectively.
BOOL CBitVector::IsEqual | ( | CBitVector & | vec | ) |
This method checks if two CBitVectors are equal or not.
vec | - Vector to be checked with current one for the case of equality. |
BOOL CBitVector::IsEqual | ( | CBitVector & | vec, |
int | from, | ||
int | to | ||
) |
This method checks if two CBitVectors are equal or not for a given range of bit positions.
vec | - Vector to be checked with current one for the case of equality. |
from | - Bit Position from which the vectors need to be checked for equality. |
to | - Bit Position until which the vectors need to be checked for equality. |
void CBitVector::ORByte | ( | int | pos, |
BYTE | p | ||
) |
This method performs OR operation bytewise with the current CBitVector at the provided byte position with another Byte object.
pos | - Byte position in the CBitVector which is used to perform OR operation with. |
p | - Byte with which the OR operation is performed to get the result. |
void CBitVector::Print | ( | int | fromBit, |
int | toBit | ||
) |
This method prints the CBitVector bitwise for provided bit range. This method internally calls GetBitNoMask(int idx). This method is called from PrintBinary().
fromBit | - The bit from which the printing starts in a CBitVector. |
toBit | - The bit until which the printing in a CBitVector is done. |
|
inline |
This method prints the CBitVector in Binary format. This method internally calls Print(int fromBit, int toBit).
void CBitVector::PrintBinaryMasked | ( | int | from, |
int | to | ||
) |
This method prints the CBitVector bitwise for provided bit range with mask. This method internally calls GetBit(int idx).
fromBit | - The bit from which the printing starts in a CBitVector. |
toBit | - The bit until which the printing in a CBitVector is done. |
void CBitVector::PrintContent | ( | ) |
This method is a more abstract printing method which is used to print the CBitVector even if the vector is a simple 1 bit based vector or 1-d array/vector or even a 2-d vector/array. This method internally calls methods Get(int i) and Get2D(int i, int j).
void CBitVector::PrintHex | ( | ) |
This method prints the CBitVector in Hexadecimal format.
void CBitVector::PrintHex | ( | int | fromByte, |
int | toByte | ||
) |
This method prints the CBitVector in Hexadecimal format for the provided byte range.
fromByte | - The byte from which the printing of CBitVector begins. |
toByte | - The byte until which the printing of CBitVector is done. |
|
inline |
This method is used to reset the values in the given CBitVector. This method sets all bit values to zeros. This is a slight variant of the method CreateZeros(uint64_t bits). The create method mentioned above allocates and sets value to zero. Whereas the provided method only sets the value to zero.
|
inline |
This method is used to reset the values in the given CBitVector for specific byte range.
frombyte | - The source byte position from which the values needs to be reset. |
tobyte | - The destination byte position until which the values needs to be reset to. |
void CBitVector::ResizeinBytes | ( | int | newSizeBytes | ) |
This method is used to resize the bytes allocated to CBitVector with newly provided size. And also accommodate the data from previous allocation to new one.
newSizeBytes | - This variable provides the new size to which the cbitvector needs to be modified to user's needs. |
|
inline |
Generic method which performs the operation of setting values to a CBitVector for a given bit position and length. This method internally calls SetBits(BYTE* p, uint64_t pos, uint64_t len).
pos | - The positional offset in the CBitVector from which the data needs to obtained. |
len | - The range limit of obtaining the data from the CBitVector. |
|
inline |
Generic method which provides more abstraction for setting elements in the CBitVector. It is mainly used for getting values which are 1-dimensional in nature. This method internally calls Set(int pos, int len).
val | - Value which needs to be written to the given location. |
i | - Index to which data needs to be written to. |
|
inline |
Generic method which provides more abstraction for setting elements in the CBitVector. It is mainly used for getting values which are 2-dimensional in nature. This method internally calls Set(int pos, int len).
val | - Value which needs to be written to the given location. |
i | - Row index from which the data needs to be written. |
j | - Column index from which the data needs to be written. |
void CBitVector::SetAND | ( | BYTE * | p, |
BYTE * | q, | ||
int | pos, | ||
int | len | ||
) |
This method is used to set and AND a CBitVector with a byte array and then AND it with another byte array for a given range. This method internally calls Copy(BYTE* p, int pos, int len) and ANDBytes(BYTE* p, int pos, int len).
p | - Pointer to the byte location to be copied to the CBitVector. |
q | - Pointer to the byte location with which the CBitVector is ANDed with. |
pos | - Positional offset for copying and ANDing into current CBitVector. |
len | - Length or amount of values to be copied and ANDed to the current vector from provided byte location. |
|
inline |
This method sets the bit in the provided index by using the maskbits and the provided bit. The maskbits brings the concept of endianness in the vector. In this method C_MASK_BIT is used to figure out the bits which are assumed to be organized in Little Endian form.
idx | - Bit Index which needs to be written to in the CBitVector. |
b | - The bit which being written in the provided index. |
|
inline |
This method sets the bit in the provided index without using the maskbits. The maskbits brings the concept of endianness in the vector. In this method mask bits are not used so the vector is treated in Big Endian form.
idx | - Bit Index which needs to be written to in the CBitVector. |
b | - The bit which being written in the provided index. |
void CBitVector::SetBits | ( | BYTE * | p, |
uint64_t | pos, | ||
uint64_t | len | ||
) |
The method for setting CBitVector for a given bit range with offset and length in unsigned 64bit integer format. This method is called from SetBits(BYTE* p, int pos, int len) and Set(T val, int pos, int len).
p | - Byte array passed to be set to the current CBitVector. |
pos | - Positional offset in the CBitVector, where data will be set from the provided byte array. |
len | - The range limit of obtaining the data from the CBitVector. |
|
inline |
The method for setting CBitVector for a given bit range with offset and length in simple integer format. This method internally calls SetBits(BYTE* p, uint64_t pos, uint64_t len).
p | - Byte array passed to be set to the current CBitVector. |
pos | - Positional offset in the CBitVector, where data will be set from the provided byte array. |
len | - The range limit of obtaining the data from the CBitVector. |
void CBitVector::SetBitsPosOffset | ( | BYTE * | p, |
int | ppos, | ||
int | pos, | ||
int | len | ||
) |
The method for setting CBitVector for a given bit range with offsets and length with another Byte Array.
p | - Byte array passed to be set with the current CBitVector. |
ppos | - Positional offset in the Byte Array. |
pos | - Positional offset in the CBitVector, where data will be set from the provided byte array. |
len | - The range limit of obtaining the data from the CBitVector. |
void CBitVector::SetBitsToZero | ( | int | bitpos, |
int | bitlen | ||
) |
This method sets the values in a given bit range to Zero in the current CBitVector.
bitpos | - Bit Positional offset in the CBitVector. |
bitlen | - Bit Length in the CBitVector until which the value needs to be set to zero. |
|
inline |
This method sets a byte in a given index of the CBitVector with the provided Byte.
idx | - Index where the byte needs to be set. |
p | - Byte which needs to be copied to. |
void CBitVector::SetBytes | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
The method for setting CBitVector for a given byte range with offset and length. This method internally calls the method SetBytes(T* dst, T* src, T* lim).
p | - Byte array passed to be set to the current CBitVector. |
pos | - Positional offset in the CBitVector, where data will be set from the provided byte array. |
len | - The range limit of obtaining the data from the CBitVector. |
void CBitVector::SetBytes | ( | T * | dst, |
T * | src, | ||
T * | lim | ||
) |
Generic method which performs the operation of setting bytes from source for the given limit. This method is called from SetBytes(BYTE* p, int pos, int len).
|
inline |
This method sets the element length of the CBitVector. It can be used to modify the object size in a CBitVector when around with the multi dimensional arrays/vectors.
elelen | - New element length which can be used to set the object size in a CBitVector. |
|
inline |
This method sets all bit position values in a CBitVector to One.
void CBitVector::SetXOR | ( | BYTE * | p, |
BYTE * | q, | ||
int | pos, | ||
int | len | ||
) |
This method is used to set and XOR a CBitVector with a byte array and then XOR it with another byte array for a given range. This method internally calls Copy(BYTE* p, int pos, int len) and XORBytes(BYTE* p, int pos, int len).
p | - Pointer to the byte location to be copied to the CBitVector. |
q | - Pointer to the byte location with which the CBitVector is XORed with. |
pos | - Positional offset for copying and XORing into current CBitVector. |
len | - Length or amount of values to be copied and XORed to the current vector from provided byte location. |
|
inline |
Generic method which is used to XOR bit wise the CBitVector. This method internally calls XORBits(BYTE* p, int pos, int len).
void CBitVector::XOR_no_mask | ( | int | p, |
int | bitPos, | ||
int | bitLen | ||
) |
Deprecated
|
inline |
This method XORs the bit in the provided index by using the maskbits and the provided bit. The maskbits brings the concept of endianness in the vector. In this method MASK_SET_BIT is used to extract and set the bits which are assumed to be organized in Little Endian form.
idx | - Bit Index which needs to be XORed to in the CBitVector. |
b | - The bit which being XORed in the provided index. |
|
inline |
This method XORs the bit in the provided index without using the maskbits. The maskbits brings the concept of endianness in the vector. In this method mask bits are not used so the vector is treated in Big Endian form.
idx | - Bit Index which needs to be XORed to in the CBitVector. |
b | - The bit which being XORed in the provided index. |
void CBitVector::XORBits | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
The method for XORing CBitVector for a given bit range with offset and length. This method is called from XOR(T val, int pos, int len).
p | - Byte array passed to be XORed with the current CBitVector. |
pos | - Positional offset in the CBitVector, where data will be XORed from the provided byte array. |
len | - The range limit of obtaining the data from the CBitVector. |
void CBitVector::XORBitsPosOffset | ( | BYTE * | p, |
int | ppos, | ||
int | pos, | ||
int | len | ||
) |
The method for XORing CBitVector for a given bit range with offsets and length with another Byte Array.
p | - Byte array passed to be XORed with the current CBitVector. |
ppos | - Positional offset in the Byte Array. |
pos | - Positional offset in the CBitVector, where data will be XORed from the provided byte array. |
len | - The range limit of obtaining the data from the CBitVector. |
|
inline |
Not Used Currently in Framework. This method performs XOR operation at the given index in the CBitVector with a provided Byte.
idx | - Index of the byte which needs to be XORed inside the CBitVector. |
b | - Byte to be XORed with the CBitVector. |
void CBitVector::XORBytes | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
This method performs XOR operation from a given position in the CBitVector with a provided Byte Array with a length. This method is called from XORBytes(BYTE* p, int len). This method internally calls XORBytes(T* dst, T* src, T* lim).
p | - Byte Array to be XORed with the CBitVector range. |
pos | - Positional offset for XORing into current CBitVector. |
len | - Length or amount of values to be XORed to the current vector from provided byte location. |
|
inline |
This method performs XOR operation for a given length in the CBitVector with a provided Byte Array. This method internally calls XORBytes(BYTE* p, int pos, int len).
p | - Byte Array to be XORed with the CBitVector range. |
len | - Length or amount of values to be XORed to the current vector from provided byte location. |
void CBitVector::XORBytes | ( | T * | dst, |
T * | src, | ||
T * | lim | ||
) |
Generic method which is used to XOR byte wise the CBitVector. This method is called from XORBytes(BYTE* p, int pos, int len).
void CBitVector::XORBytesReverse | ( | BYTE * | p, |
int | pos, | ||
int | len | ||
) |
This method performs XOR operation from a given position in the CBitVector with a provided Byte Array with a length. The XORing is performed in a slightly different way. The byte array is reversed before it is XORed with the CBitVector. This method is called from XORBytes(BYTE* p, int len). This method internally calls XORBytes(T* dst, T* src, T* lim).
p | - Byte Array to be XORed with the CBitVector range. |
pos | - Positional offset for XORing into current CBitVector. |
len | - Length or amount of values to be XORed to the current vector from provided byte location. |
void CBitVector::XORRepeat | ( | BYTE * | p, |
int | pos, | ||
int | len, | ||
int | num | ||
) |
Deprecated
|
inline |
Not Used in the Framework. This method performs XOR operation from a given position in the CBitVector with another CBitVector with a length. This method internally calls XORBytes(BYTE* p, int pos, int len).
vec | - Provided Array to be XORed with the CBitVector. |
pos | - Positional offset for XORing into current CBitVector. |
len | - Length or amount of values to be XORed to the current vector from provided byte location. |