AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::crypto::ZeroPadding Class Reference

Zero padding implementation. More...

#include <zeroPadding.hpp>

+ Collaboration diagram for anch::crypto::ZeroPadding:

Static Public Member Functions

static void pad (uint8_t *data, std::size_t len, std::size_t expLen)
 
static std::size_t length (uint8_t *data, std::size_t len)
 

Detailed Description

Zero padding implementation.

Add 0x00 until the end of the block.
Zero padding may not be reversible when data to pad ends with 0x00 (end of string).

Since
0.1
Author
Vincent Lachenal

Member Function Documentation

◆ length()

static std::size_t anch::crypto::ZeroPadding::length ( uint8_t * data,
std::size_t len )
static

Unpad data

Parameters
datathe data to unpad
lenthe block length
Returns
the data length

◆ pad()

static void anch::crypto::ZeroPadding::pad ( uint8_t * data,
std::size_t len,
std::size_t expLen )
static

Pad data

Parameters
datathe data to pad
lenthe data length
expLenthe expected length

The documentation for this class was generated from the following file: