mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
827 B
26 lines
827 B
9 years ago
|
#ifndef BASE_H__
|
||
|
#define BASE_H__
|
||
|
|
||
|
#include <inttypes.h>
|
||
|
#include <string>
|
||
9 years ago
|
#include <iostream>
|
||
9 years ago
|
|
||
9 years ago
|
namespace i2p {
|
||
|
namespace data {
|
||
9 years ago
|
size_t ByteStreamToBase64 (const uint8_t * InBuffer, size_t InCount, char * OutBuffer, size_t len);
|
||
|
size_t Base64ToByteStream (const char * InBuffer, size_t InCount, uint8_t * OutBuffer, size_t len );
|
||
9 years ago
|
const char * GetBase32SubstitutionTable ();
|
||
9 years ago
|
const char * GetBase64SubstitutionTable ();
|
||
|
|
||
|
size_t Base32ToByteStream (const char * inBuf, size_t len, uint8_t * outBuf, size_t outLen);
|
||
|
size_t ByteStreamToBase32 (const uint8_t * InBuf, size_t len, char * outBuf, size_t outLen);
|
||
|
|
||
9 years ago
|
/**
|
||
|
Compute the size for a buffer to contain encoded base64 given that the size of the input is input_size bytes
|
||
|
*/
|
||
|
size_t Base64EncodingBufferSize(const size_t input_size);
|
||
9 years ago
|
} // data
|
||
|
} // i2p
|
||
9 years ago
|
|
||
|
#endif
|