template class xf::security::internal::packBase

#include "msgpack.hpp"

Overview

Base class of msg packer.

Parameters:

W Bit width of one row. Support 64, 128, 256, 512.
template <int W>
class packBase

    // direct descendants

    template <int KeyW>
    class xf::security::internal::aesCbcPack

// fields

int64_t msg_num
int64_t curr_ptr
int64_t buffer_size
int64_t total_row
unsigned char* buffer_ptr
bool isReset
bool isMemAlloced

Methods

reset

void reset ()

Reset records for packBase , need to be called each time a new pack to be process. reset function won’t release any alloced memory. Should only be used on host side.

setPtr

void setPtr (
    unsigned char* ptr,
    int64_t size
    )

Assign alloced memory to packBase to process. Should only be used on host side.

Parameters:

ptr Pointer to allocated memory. Size of allocated memory.

finishPack

void finishPack ()

Finish a pack by adding number of message and effective rows of pack. This funciton need to be called once before send the package for processing. Should only be used on host side.

Parameters:

ptr Pointer to allocated memory. Size of allocated memory.