1#ifndef ROSE_DATA_CONVERSION_H
2#define ROSE_DATA_CONVERSION_H
4#include <featureTests.h>
5#ifdef ROSE_ENABLE_BINARY_ANALYSIS
17 virtual std::string
name()
const = 0;
22 virtual uint8_t*
encode(uint8_t* buffer,
size_t* nbytes) = 0;
27 virtual uint8_t*
decode(uint8_t* buffer,
size_t* nbytes) = 0;
33 virtual std::string name()
const {
return "ROT-13";}
34 virtual uint8_t* encode(uint8_t* buffer,
size_t* nbytes);
35 virtual uint8_t* decode(uint8_t* buffer,
size_t* nbytes);
Encodes and decodes a buffer using an algorithm defined in subclasses.
virtual uint8_t * encode(uint8_t *buffer, size_t *nbytes)=0
Encodes a buffer.
virtual uint8_t * decode(uint8_t *buffer, size_t *nbytes)=0
Decodes a buffer.
virtual std::string name() const =0
Name of the converter, mostly for debugging purposes.
The ROT-13 algorithm, extended to operate over the entire 8-bit domain/range.