Initial
This commit is contained in:
52
uudecode/DECODE.HPP
Normal file
52
uudecode/DECODE.HPP
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef _UUDECODE_DECODE_HPP_
|
||||
#define _UUDECODE_DECODE_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
|
||||
extern "C"
|
||||
{
|
||||
WORD _cdecl uudecode(const char *szPathFileName,char *szPathOutputFileName);
|
||||
WORD _cdecl decodeBase64(const char *szPathFileName,char *szPathOutputFileName);
|
||||
}
|
||||
|
||||
class GenDecode
|
||||
{
|
||||
public:
|
||||
static bool decode(const String &pathFileName,String &pathOutputFileName);
|
||||
static bool decode(const String &pathFileName);
|
||||
private:
|
||||
GenDecode(void);
|
||||
virtual ~GenDecode();
|
||||
};
|
||||
|
||||
inline
|
||||
GenDecode::GenDecode(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
GenDecode::~GenDecode()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
bool GenDecode::decode(const String &pathFileName)
|
||||
{
|
||||
String strPathOutputFileName;
|
||||
strPathOutputFileName.reserve(256);
|
||||
return decode(pathFileName,strPathOutputFileName);
|
||||
}
|
||||
|
||||
inline
|
||||
bool GenDecode::decode(const String &pathFileName,String &pathOutputFileName)
|
||||
{
|
||||
String strPathOutputFileName;
|
||||
|
||||
strPathOutputFileName.reserve(256);
|
||||
if(!uudecode((LPSTR)pathFileName,(LPSTR)strPathOutputFileName))
|
||||
if(!decodeBase64((LPSTR)pathFileName,strPathOutputFileName))return false;
|
||||
pathOutputFileName=strPathOutputFileName;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user