mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
26 Commits
v5.0.99.97
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| e69c1677b2 | |||
| 4dae8f50fa | |||
| 9cc5ed1db0 | |||
| 6d1dd9c420 | |||
| 549e3dc579 | |||
| 8440b18223 | |||
| 470eddf2b1 | |||
| 3813be21c7 | |||
| 68c8c0cb29 | |||
| ab0c5703a5 | |||
| e22b63347f | |||
| 438ba3aded | |||
| 29b002ca80 | |||
| 244d549cf8 | |||
| 7a27150de6 | |||
| 2197fddb7b | |||
| d31344d7d3 | |||
| 8312cce2c3 | |||
| dc89e1d484 | |||
| ebdfb2f785 | |||
| ec2901bf48 | |||
| 5f0e6349cc | |||
| d586698025 | |||
| ad40f51dee | |||
| 1f9e3f4fd8 | |||
| 828df16fe5 |
@ -36,7 +36,7 @@ namespace BinDocxRW {
|
||||
|
||||
int Binary_VbaProjectTableReader::Read()
|
||||
{
|
||||
m_oFileWriter.m_pVbaProject = new OOX::VbaProject();
|
||||
m_oFileWriter.m_pVbaProject = new OOX::VbaProject();
|
||||
m_oFileWriter.m_pVbaProject->fromPPTY(&m_oBufferedStream);
|
||||
|
||||
return c_oSerConstants::ReadOk;
|
||||
@ -118,4 +118,4 @@ int Binary_HdrFtrTableReader::ReadHdrFtrItemContent(BYTE type, long length, void
|
||||
return pBinary_DocumentTableReader->ReadDocumentContent(type, length, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ public:
|
||||
}
|
||||
|
||||
int Read ();
|
||||
};
|
||||
};
|
||||
|
||||
class Binary_HdrFtrTableReader : public Binary_CommonReader<Binary_HdrFtrTableReader>
|
||||
{
|
||||
|
||||
@ -95,7 +95,7 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const std::wstring& sSrcFileName, co
|
||||
oDrawingConverter.SetMainDocument(this);
|
||||
|
||||
oDrawingConverter.SetDstPath(pathMain.GetDirectory() + FILE_SEPARATOR_STR + L"word");
|
||||
oDrawingConverter.SetMediaDstPath(pathMedia.GetPath());
|
||||
oDrawingConverter.SetMediaDstPath(pathMedia.GetPath());
|
||||
|
||||
m_pParamsWriter = new ParamsWriter(&oBufferedStream, &fp, &oDrawingConverter, pEmbeddedFontsManager);
|
||||
|
||||
@ -265,10 +265,10 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const std::wstring& sSrcFileName,
|
||||
|
||||
if (NULL != pData)
|
||||
{
|
||||
oDrawingConverter.SetMainDocument(this);
|
||||
oDrawingConverter.SetMainDocument(this);
|
||||
oDrawingConverter.SetDstPath(sDstPath + FILE_SEPARATOR_STR + L"word");
|
||||
|
||||
oDrawingConverter.SetMediaDstPath(sMediaPath);
|
||||
oDrawingConverter.SetMediaDstPath(sMediaPath);
|
||||
oDrawingConverter.SetEmbedDstPath(sEmbedPath);
|
||||
|
||||
m_pCurFileWriter = new Writers::FileWriter(sDstPath, m_sFontDir, false, nVersion, m_bSaveChartAsImg, &oDrawingConverter, sThemePath);
|
||||
|
||||
@ -88,12 +88,12 @@ namespace BinXlsxRW{
|
||||
{
|
||||
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
|
||||
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
|
||||
oDrawingConverter.SetDstPath(sDstPath + FILE_SEPARATOR_STR + L"xl");
|
||||
oDrawingConverter.SetSrcPath(strFileInDir, 2);
|
||||
|
||||
oDrawingConverter.SetMediaDstPath(sMediaDir);
|
||||
oDrawingConverter.SetMediaDstPath(sMediaDir);
|
||||
oDrawingConverter.SetEmbedDstPath(sEmbedDir);
|
||||
|
||||
BinXlsxRW::BinaryFileReader oBinaryFileReader;
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
17E17ED41AC453F800BEA2EA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0710;
|
||||
ORGANIZATIONNAME = "Ascensio System SIA";
|
||||
};
|
||||
buildConfigurationList = 17E17ED71AC453F800BEA2EA /* Build configuration list for PBXProject "ASCOfficeDocxFile2Lib" */;
|
||||
@ -441,21 +441,13 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -463,7 +455,6 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@ -476,7 +467,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
@ -492,21 +483,13 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -514,14 +497,13 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
|
||||
@ -454,7 +454,7 @@ namespace formulasconvert {
|
||||
// boost::match_default | boost::format_all);
|
||||
|
||||
bool isFormula = check_formula(workstr);
|
||||
|
||||
|
||||
boost::regex_replace(
|
||||
workstr,
|
||||
boost::wregex(L"('.*?')|(\".*?\")"),
|
||||
@ -477,6 +477,12 @@ namespace formulasconvert {
|
||||
}
|
||||
//todooo INDEX((A1:C6~A8:C11),2,2,2) - ???? - INDEX_emb.ods
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t sz_workstr = workstr.length();
|
||||
if (workstr.substr(0, (std::min)((size_t)3, sz_workstr)) == L"of:")//sample_02neu_crashes.ods
|
||||
workstr = workstr.substr(3);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
@ -800,7 +800,7 @@ bool docx_conversion_context::process_page_properties(std::wostream & strm)
|
||||
|
||||
if (page_layout_instance_)
|
||||
{
|
||||
page_layout_instance_->docx_convert_serialize(strm, *this);
|
||||
page_layout_instance_->docx_serialize(strm, *this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -181,7 +181,11 @@ std::wstring mediaitems::add_or_find(const std::wstring & href, RelsType type, b
|
||||
sub_path = L"embeddings/";
|
||||
}
|
||||
else
|
||||
{
|
||||
isMediaInternal = is_internal(href, odf_packet_);
|
||||
if (href.empty() && type == typeImage)
|
||||
return L"";
|
||||
}
|
||||
|
||||
int number=0;
|
||||
|
||||
@ -205,9 +209,9 @@ std::wstring mediaitems::add_or_find(const std::wstring & href, RelsType type, b
|
||||
if ( type == typeChart) outputPath = outputPath + L".xml";
|
||||
|
||||
std::wstring id;
|
||||
for (int i = 0 ; i < items_.size(); i++)
|
||||
for (size_t i = 0 ; i < items_.size(); i++)
|
||||
{
|
||||
if (items_[i].href == inputPath)
|
||||
if ((items_[i].href == inputPath && !inputPath.empty()) || (items_[i].type == type && inputPath.empty()))
|
||||
{
|
||||
id = items_[i].Id;
|
||||
outputPath = items_[i].outputName;
|
||||
|
||||
@ -144,7 +144,7 @@ void styles_context::docx_serialize_table_style(std::wostream & strm, std::wstri
|
||||
namespace oox
|
||||
{
|
||||
math_context::math_context(odf_reader::fonts_container & fonts, bool graphic) :
|
||||
base_font_size_(12), fonts_container_(fonts)
|
||||
base_font_size_(12), fonts_container_(fonts), is_need_e_(false)
|
||||
{
|
||||
graphRPR_ = graphic;
|
||||
|
||||
|
||||
@ -106,6 +106,8 @@ namespace oox {
|
||||
|
||||
std::wstring nsRPr_;
|
||||
bool graphRPR_;
|
||||
|
||||
bool is_need_e_;
|
||||
private:
|
||||
std::wstringstream math_stream_;
|
||||
std::wstringstream math_style_stream_;
|
||||
|
||||
@ -436,8 +436,14 @@ void _oox_drawing::serialize_shape(std::wostream & strm)
|
||||
{
|
||||
CP_XML_NODE(L"a:path")
|
||||
{
|
||||
CP_XML_ATTR(L"w", w ? *w : cx);
|
||||
CP_XML_ATTR(L"h", h ? *h : cy);
|
||||
int path_w = w ? *w : cx;
|
||||
int path_h = h ? *h : cy;
|
||||
|
||||
if (path_w < 1) path_w = 1024;
|
||||
if (path_h < 1) path_h = 1024;
|
||||
|
||||
CP_XML_ATTR(L"w", path_w);
|
||||
CP_XML_ATTR(L"h", path_h);
|
||||
|
||||
if (sCustomPath)
|
||||
{
|
||||
|
||||
@ -83,7 +83,7 @@ namespace oox {
|
||||
class _oox_drawing
|
||||
{
|
||||
public:
|
||||
_oox_drawing() : type(typeUnknown), id(0), x(0), y(0), cx(0), cy(0), sub_type(0), inGroup(false), name(L"object")
|
||||
_oox_drawing() : type(typeUnknown), id(0), x(0), y(0), cx(0), cy(0), sub_type(0), inGroup(false), name(L"object"), extExternal(false)
|
||||
{
|
||||
}
|
||||
RelsType type;
|
||||
@ -103,6 +103,7 @@ namespace oox {
|
||||
std::wstring objectProgId;
|
||||
|
||||
std::wstring extId;
|
||||
bool extExternal;
|
||||
|
||||
_action_desc action;
|
||||
std::vector<_hlink_desc> hlinks;
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
oox_bitmap_fill::oox_bitmap_fill() : name_space(L"a"), bStretch(false), bCrop(false),bTile(false),isInternal(true)
|
||||
oox_bitmap_fill::oox_bitmap_fill() : name_space(L"a"), bStretch(false), bCrop(false), bTile(false), isInternal(true)
|
||||
{
|
||||
memset(cropRect,0,sizeof(double)*4);
|
||||
}
|
||||
@ -186,10 +186,10 @@ void oox_serialize_bitmap_fill(std::wostream & strm, const _oox_fill & val)
|
||||
{
|
||||
CP_XML_NODE(L"a:srcRect")
|
||||
{
|
||||
CP_XML_ATTR(L"l", static_cast<size_t>(val.bitmap->cropRect[0]*1000));
|
||||
CP_XML_ATTR(L"t", static_cast<size_t>(val.bitmap->cropRect[1]*1000));
|
||||
CP_XML_ATTR(L"r", static_cast<size_t>(val.bitmap->cropRect[2]*1000));
|
||||
CP_XML_ATTR(L"b", static_cast<size_t>(val.bitmap->cropRect[3]*1000));
|
||||
CP_XML_ATTR(L"l", static_cast<int>(val.bitmap->cropRect[0]*1000));
|
||||
CP_XML_ATTR(L"t", static_cast<int>(val.bitmap->cropRect[1]*1000));
|
||||
CP_XML_ATTR(L"r", static_cast<int>(val.bitmap->cropRect[2]*1000));
|
||||
CP_XML_ATTR(L"b", static_cast<int>(val.bitmap->cropRect[3]*1000));
|
||||
}
|
||||
}
|
||||
if (val.bitmap->bTile)
|
||||
|
||||
@ -147,6 +147,6 @@ namespace oox {
|
||||
void oox_serialize_fill (std::wostream & strm, const _oox_fill & val);
|
||||
void oox_serialize_srgb (std::wostream & strm,std::wstring color,_CP_OPT(double) opacity);
|
||||
void oox_serialize_srgb (std::wostream & strm,std::wstring color,_CP_OPT(odf_types::percent) opacity);
|
||||
|
||||
void oox_serialize_bitmap_fill (std::wostream & strm, const _oox_fill & val);
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,13 +70,14 @@ static std::wstring get_mime_type(const std::wstring & extension)
|
||||
else if (L"tif" == extension) return L"image/x-tiff";
|
||||
else if (L"tiff" == extension) return L"image/x-tiff";
|
||||
else if (L"pdf" == extension) return L"application/pdf";
|
||||
else if (L"bmp" == extension) return L"image/bmp";
|
||||
|
||||
else if (L"wav" == extension) return L"audio/wav";
|
||||
else if (L"mp3" == extension) return L"audio/mpeg";
|
||||
else if (L"wma" == extension) return L"audio/x-ms-wma";
|
||||
else if (L"m4a" == extension) return L"audio/unknown";
|
||||
|
||||
else if (L"avi" == extension) return L"video/avi";
|
||||
else if (L"avi" == extension) return L"video/x-msvideo";
|
||||
else if (L"wmv" == extension) return L"video/x-ms-wmv";
|
||||
else if (L"mov" == extension) return L"video/unknown";
|
||||
else if (L"mp4" == extension) return L"video/unknown";
|
||||
|
||||
@ -150,15 +150,30 @@ void pptx_serialize_media(std::wostream & strm, _pptx_drawing & val)
|
||||
CP_XML_NODE(L"p14:media")
|
||||
{
|
||||
CP_XML_ATTR(L"xmlns:p14", L"http://schemas.microsoft.com/office/powerpoint/2010/main");
|
||||
CP_XML_ATTR(L"r:embed", val.extId);
|
||||
if (val.extExternal)
|
||||
{
|
||||
CP_XML_ATTR(L"r:link", val.extId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_ATTR(L"r:embed", val.extId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (val.fill.bitmap)
|
||||
{
|
||||
val.fill.bitmap->name_space = L"p";
|
||||
oox_serialize_fill(CP_XML_STREAM(), val.fill);
|
||||
oox_serialize_bitmap_fill(strm, val.fill);
|
||||
|
||||
val.fill.bitmap.reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_NODE(L"p:blipFill");
|
||||
}
|
||||
|
||||
CP_XML_NODE(L"p:spPr")
|
||||
{
|
||||
@ -169,7 +184,8 @@ void pptx_serialize_media(std::wostream & strm, _pptx_drawing & val)
|
||||
CP_XML_ATTR(L"prst", L"rect");
|
||||
CP_XML_NODE(L"a:avLst");
|
||||
}
|
||||
oox_serialize_ln(CP_XML_STREAM(), val.additional);
|
||||
oox_serialize_fill (CP_XML_STREAM(), val.fill);
|
||||
oox_serialize_ln (CP_XML_STREAM(), val.additional);
|
||||
}
|
||||
//_CP_OPT(std::wstring) strTextContent;
|
||||
//odf::GetProperty(properties,L"text-content",strTextContent);
|
||||
|
||||
@ -554,8 +554,9 @@ void pptx_slide_context::Impl::process_image(drawing_object_description& obj, _p
|
||||
std::wstring ref;/// это ссылка на выходной внешний объект
|
||||
bool isMediaInternal = false;
|
||||
|
||||
drawing.fill.bitmap->rId = get_mediaitems().add_or_find(obj.xlink_href_, typeImage, isMediaInternal, ref);
|
||||
|
||||
drawing.fill.bitmap->rId = get_mediaitems().add_or_find(obj.xlink_href_, typeImage, isMediaInternal, ref);
|
||||
drawing.fill.bitmap->isInternal = isMediaInternal;
|
||||
|
||||
if (drawing.type == typeShape)
|
||||
{
|
||||
add_additional_rels(isMediaInternal, drawing.fill.bitmap->rId, ref, typeImage);//собственно это не объект, а доп рел и ref объекта
|
||||
@ -647,11 +648,12 @@ void pptx_slide_context::Impl::process_media(drawing_object_description& obj, _p
|
||||
|
||||
drawing.type = mediaitems::detectMediaType(obj.xlink_href_); //reset from Media to Audio, Video, ... QuickTime? AudioCD? ...
|
||||
|
||||
drawing.objectId = get_mediaitems().add_or_find(obj.xlink_href_, drawing.type, isMediaInternal, ref);
|
||||
drawing.extId = L"ext" + drawing.objectId;
|
||||
drawing.objectId = get_mediaitems().add_or_find(obj.xlink_href_, drawing.type, isMediaInternal, ref);
|
||||
drawing.extId = L"ext" + drawing.objectId;
|
||||
drawing.extExternal = !isMediaInternal;
|
||||
|
||||
add_drawing(drawing, false, drawing.objectId, L"NULL", drawing.type);
|
||||
add_additional_rels( true, drawing.extId, ref, typeMedia);
|
||||
add_additional_rels( isMediaInternal, drawing.extId, ref, typeMedia);
|
||||
|
||||
if (drawing.fill.bitmap)
|
||||
{
|
||||
@ -751,10 +753,10 @@ void pptx_slide_context::serialize_animations(std::wostream & strm)
|
||||
{
|
||||
CP_XML_ATTR(L"spd",impl_->transition_.Speed.get());
|
||||
}
|
||||
if (impl_->transition_.Time)
|
||||
/* if (impl_->transition_.Time)
|
||||
{
|
||||
CP_XML_ATTR(L"p14:dur", impl_->transition_.Time.get());
|
||||
}
|
||||
}*/
|
||||
if (impl_->transition_.PageTime)
|
||||
{
|
||||
CP_XML_ATTR(L"advTm", impl_->transition_.PageTime.get());
|
||||
|
||||
@ -332,21 +332,34 @@ void oox_serialize_tcPr(std::wostream & strm, std::vector<const odf_reader::styl
|
||||
}
|
||||
if (style_cell_attlist.common_padding_attlist_.fo_padding_)
|
||||
{
|
||||
CP_XML_ATTR(L"marT", *style_cell_attlist.common_padding_attlist_.fo_padding_);
|
||||
CP_XML_ATTR(L"marB", *style_cell_attlist.common_padding_attlist_.fo_padding_);
|
||||
CP_XML_ATTR(L"marL", *style_cell_attlist.common_padding_attlist_.fo_padding_);
|
||||
CP_XML_ATTR(L"marR", *style_cell_attlist.common_padding_attlist_.fo_padding_);
|
||||
double padding = style_cell_attlist.common_padding_attlist_.fo_padding_->get_value_unit(odf_types::length::emu);
|
||||
CP_XML_ATTR(L"marT", (long)padding);
|
||||
CP_XML_ATTR(L"marB", (long)padding);
|
||||
CP_XML_ATTR(L"marL", (long)padding);
|
||||
CP_XML_ATTR(L"marR", (long)padding);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (style_cell_attlist.common_padding_attlist_.fo_padding_top_)
|
||||
CP_XML_ATTR(L"marT", *style_cell_attlist.common_padding_attlist_.fo_padding_top_);
|
||||
{
|
||||
double padding = style_cell_attlist.common_padding_attlist_.fo_padding_top_->get_value_unit(odf_types::length::emu);
|
||||
CP_XML_ATTR(L"marT", (long)padding);
|
||||
}
|
||||
if (style_cell_attlist.common_padding_attlist_.fo_padding_bottom_)
|
||||
CP_XML_ATTR(L"marB", *style_cell_attlist.common_padding_attlist_.fo_padding_bottom_);
|
||||
{
|
||||
double padding = style_cell_attlist.common_padding_attlist_.fo_padding_bottom_->get_value_unit(odf_types::length::emu);
|
||||
CP_XML_ATTR(L"marB", (long)padding);
|
||||
}
|
||||
if (style_cell_attlist.common_padding_attlist_.fo_padding_left_)
|
||||
CP_XML_ATTR(L"marL", *style_cell_attlist.common_padding_attlist_.fo_padding_left_);
|
||||
{
|
||||
double padding = style_cell_attlist.common_padding_attlist_.fo_padding_left_->get_value_unit(odf_types::length::emu);
|
||||
CP_XML_ATTR(L"marL", (long)padding);
|
||||
}
|
||||
if (style_cell_attlist.common_padding_attlist_.fo_padding_right_)
|
||||
CP_XML_ATTR(L"marR", *style_cell_attlist.common_padding_attlist_.fo_padding_right_);
|
||||
{
|
||||
double padding = style_cell_attlist.common_padding_attlist_.fo_padding_right_->get_value_unit(odf_types::length::emu);
|
||||
CP_XML_ATTR(L"marR", (long)padding);
|
||||
}
|
||||
}
|
||||
//vert //
|
||||
//style_cell_attlist.pptx_serialize(Context, CP_XML_STREAM()); //nodes
|
||||
|
||||
@ -281,6 +281,11 @@ void xlsx_conditionalFormatting_context::set_formula(std::wstring f)
|
||||
impl_->conditionalFormattings_.back().rules.back().formula_type = L"expression";
|
||||
impl_->conditionalFormattings_.back().rules.back().formula = converter.convert_named_expr(val);
|
||||
}
|
||||
else if (0 <= (pos = f.find(L"is-error")))
|
||||
{
|
||||
impl_->conditionalFormattings_.back().rules.back().formula_type = L"containsErrors";
|
||||
impl_->conditionalFormattings_.back().rules.back().formula = L"0";
|
||||
}
|
||||
else if (0 <= (pos = f.find(L"duplicate")))
|
||||
{
|
||||
impl_->conditionalFormattings_.back().rules.back().formula_type = L"duplicateValues";
|
||||
|
||||
@ -38,6 +38,8 @@
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include"../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
#include"../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace cpdoccore {
|
||||
@ -80,6 +82,7 @@ public:
|
||||
bool repeat_item_labels = true;
|
||||
int type_groups = 0;
|
||||
int sort = 0;
|
||||
std::wstring source_groups;
|
||||
|
||||
std::vector<int> subtotals;
|
||||
|
||||
@ -143,9 +146,13 @@ public:
|
||||
bool data_on_row = false;
|
||||
}current_;
|
||||
|
||||
void sort_fields();
|
||||
|
||||
void serialize_view(std::wostream & strm);
|
||||
void serialize_cache(std::wostream & strm);
|
||||
|
||||
void serialize_type_field(CP_ATTR_NODE, _field & field);
|
||||
|
||||
private:
|
||||
bool clear_header_map(std::map<size_t, size_t> & map)
|
||||
{//отсев по секонд - нужны тока повторы
|
||||
@ -243,12 +250,27 @@ private:
|
||||
}
|
||||
connections_ += strm.str();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
xlsx_pivots_context::xlsx_pivots_context() : impl_(new xlsx_pivots_context::Impl())
|
||||
{
|
||||
}
|
||||
|
||||
void xlsx_pivots_context::Impl::sort_fields()
|
||||
{
|
||||
for (size_t i = 0; i < current_.fields.size(); i++)
|
||||
{
|
||||
if (current_.fields[i].type == 7)
|
||||
continue;
|
||||
if (!current_.fields[i].source_groups.empty() && i != current_.fields.size() -1)
|
||||
{
|
||||
current_.fields.push_back(current_.fields[i]);
|
||||
current_.fields.erase(current_.fields.begin() + i , current_.fields.begin() + i + 1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
void xlsx_pivots_context::Impl::serialize_view(std::wostream & strm)
|
||||
{
|
||||
if (current_.headers.empty()) return;
|
||||
@ -403,6 +425,7 @@ void xlsx_pivots_context::Impl::serialize_view(std::wostream & strm)
|
||||
CP_XML_ATTR(L"colPageCount", 1);
|
||||
}
|
||||
}
|
||||
std::map<std::wstring, bool> used_field_name;
|
||||
CP_XML_NODE(L"pivotFields")
|
||||
{
|
||||
CP_XML_ATTR(L"count", current_.fields_count);
|
||||
@ -411,6 +434,11 @@ void xlsx_pivots_context::Impl::serialize_view(std::wostream & strm)
|
||||
if (current_.fields[i].type == 7)
|
||||
continue;
|
||||
|
||||
if (used_field_name.end() != used_field_name.find(current_.fields[i].name))
|
||||
continue;
|
||||
|
||||
used_field_name.insert(std::make_pair(current_.fields[i].name, true));
|
||||
|
||||
CP_XML_NODE(L"pivotField")
|
||||
{
|
||||
switch(current_.fields[i].type)
|
||||
@ -554,9 +582,90 @@ void xlsx_pivots_context::Impl::serialize_view(std::wostream & strm)
|
||||
}
|
||||
}
|
||||
}
|
||||
void xlsx_pivots_context::Impl::serialize_type_field(CP_ATTR_NODE, _field & field)
|
||||
{
|
||||
_CP_OPT(bool) containsSemiMixedTypes;
|
||||
_CP_OPT(bool) containsMixedTypes;
|
||||
_CP_OPT(bool) containsNonDate;
|
||||
_CP_OPT(bool) containsDate;
|
||||
_CP_OPT(bool) containsString;
|
||||
_CP_OPT(bool) containsBlank;
|
||||
_CP_OPT(bool) containsNumber;
|
||||
_CP_OPT(bool) containsInteger;
|
||||
|
||||
if (field.bDate & field.bNumber/* ||
|
||||
field.bNumber & field.bString*/)
|
||||
{
|
||||
containsSemiMixedTypes = true;
|
||||
}
|
||||
else if (field.bDate & field.bString ||
|
||||
field.bNumber & field.bString ||
|
||||
field.bInteger & field.bString)
|
||||
{
|
||||
containsMixedTypes = true;
|
||||
|
||||
if (field.bInteger)
|
||||
{
|
||||
if (field.bNumber) field.bInteger = false;
|
||||
field.bNumber = true;
|
||||
}
|
||||
}
|
||||
else if (!field.bEmpty && !field.bString && !field.bBool)
|
||||
{
|
||||
containsSemiMixedTypes = false;
|
||||
}
|
||||
if (field.bDate &&
|
||||
!(field.bNumber || field.bInteger || field.bString || field.bEmpty ))
|
||||
{
|
||||
containsNonDate = false;
|
||||
}
|
||||
if (field.bDate)
|
||||
{
|
||||
containsDate = true;
|
||||
}
|
||||
if (!field.bString &&
|
||||
(field.bInteger || field.bDate || field.bNumber || field.bEmpty))
|
||||
{
|
||||
containsString = false;
|
||||
if (field.bInteger)
|
||||
{
|
||||
if (field.bNumber) field.bInteger = false;
|
||||
field.bNumber = true;
|
||||
}
|
||||
if (/*!field.bDate && */field.bEmpty)
|
||||
containsNonDate = false;
|
||||
}
|
||||
if (field.bEmpty)
|
||||
{
|
||||
containsBlank = true;
|
||||
}
|
||||
if (field.bNumber)
|
||||
{
|
||||
containsNumber = true;
|
||||
}
|
||||
if (field.bInteger && !field.bDate)
|
||||
{
|
||||
if (containsMixedTypes)
|
||||
{
|
||||
containsNumber = true;
|
||||
containsInteger = true;
|
||||
}
|
||||
else
|
||||
containsInteger = true;
|
||||
}
|
||||
|
||||
if (containsNonDate) CP_XML_ATTR(L"containsNonDate", *containsNonDate);
|
||||
if (containsSemiMixedTypes) CP_XML_ATTR(L"containsSemiMixedTypes", *containsSemiMixedTypes);
|
||||
if (containsString) CP_XML_ATTR(L"containsString", *containsString);
|
||||
if (containsBlank) CP_XML_ATTR(L"containsBlank", *containsBlank);
|
||||
if (containsMixedTypes) CP_XML_ATTR(L"containsMixedTypes", *containsMixedTypes);
|
||||
if (containsDate) CP_XML_ATTR(L"containsDate", *containsDate);
|
||||
if (containsNumber) CP_XML_ATTR(L"containsNumber", *containsNumber);
|
||||
if (containsInteger) CP_XML_ATTR(L"containsInteger", *containsInteger);
|
||||
}
|
||||
void xlsx_pivots_context::Impl::serialize_cache(std::wostream & strm)
|
||||
{
|
||||
std::map<std::wstring, bool> used_field_name;
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"pivotCacheDefinition")
|
||||
@ -611,16 +720,26 @@ void xlsx_pivots_context::Impl::serialize_cache(std::wostream & strm)
|
||||
if (current_.fields[i].type == 7)
|
||||
continue;
|
||||
|
||||
if (used_field_name.end() != used_field_name.find(current_.fields[i].name))
|
||||
continue;
|
||||
|
||||
used_field_name.insert(std::make_pair(current_.fields[i].name, true));
|
||||
|
||||
CP_XML_NODE(L"cacheField")
|
||||
{
|
||||
CP_XML_ATTR(L"name", current_.fields[i].name);
|
||||
CP_XML_ATTR(L"numFmtId", 0);
|
||||
|
||||
if (!current_.fields[i].source_groups.empty())
|
||||
{
|
||||
CP_XML_ATTR(L"databaseField", 0);
|
||||
}
|
||||
|
||||
CP_XML_NODE(L"sharedItems")
|
||||
{
|
||||
if (current_.fields[i].caches.empty() == false/* &&
|
||||
current_.fields[i].type != 2*/)
|
||||
{
|
||||
{
|
||||
if (current_.fields[i].type_groups == 0)
|
||||
{
|
||||
CP_XML_ATTR(L"count", current_.fields[i].caches.size());
|
||||
@ -630,48 +749,8 @@ void xlsx_pivots_context::Impl::serialize_cache(std::wostream & strm)
|
||||
current_.fields[i].bDate = true;
|
||||
current_.fields[i].bString = false;
|
||||
}
|
||||
|
||||
if ((current_.fields[i].bDate & current_.fields[i].bNumber) ||
|
||||
(current_.fields[i].bNumber & current_.fields[i].bString))
|
||||
{
|
||||
CP_XML_ATTR(L"containsSemiMixedTypes", 1);
|
||||
}
|
||||
else if (current_.fields[i].bDate & current_.fields[i].bString)
|
||||
{
|
||||
CP_XML_ATTR(L"containsMixedTypes", 1);
|
||||
}
|
||||
else if (!current_.fields[i].bEmpty && !current_.fields[i].bString && !current_.fields[i].bBool)
|
||||
{
|
||||
CP_XML_ATTR(L"containsSemiMixedTypes", 0);
|
||||
}
|
||||
if (current_.fields[i].bDate &&
|
||||
!(current_.fields[i].bNumber || current_.fields[i].bInteger || current_.fields[i].bString || current_.fields[i].bEmpty ))
|
||||
{
|
||||
CP_XML_ATTR(L"containsNonDate", 0);
|
||||
}
|
||||
if (current_.fields[i].bDate) CP_XML_ATTR(L"containsDate", 1);
|
||||
if (!current_.fields[i].bString &&
|
||||
(current_.fields[i].bInteger || current_.fields[i].bDate || current_.fields[i].bNumber || current_.fields[i].bEmpty))
|
||||
{
|
||||
CP_XML_ATTR(L"containsString", 0);
|
||||
}
|
||||
if (current_.fields[i].bEmpty) CP_XML_ATTR(L"containsBlank", 1);
|
||||
|
||||
if (current_.fields[i].bNumber) CP_XML_ATTR(L"containsNumber", 1);
|
||||
|
||||
if (current_.fields[i].bInteger && !current_.fields[i].bDate)
|
||||
{
|
||||
if (current_.fields[i].bString)
|
||||
{
|
||||
CP_XML_ATTR(L"containsInteger", 1);
|
||||
}
|
||||
else if (!current_.fields[i].bNumber)
|
||||
{
|
||||
CP_XML_ATTR(L"containsNumber", 1);
|
||||
CP_XML_ATTR(L"containsInteger", 1);
|
||||
}
|
||||
}
|
||||
|
||||
serialize_type_field(CP_GET_XML_NODE(), current_.fields[i]);
|
||||
if ( current_.fields[i].type_groups == 0 )
|
||||
{
|
||||
for (size_t j = 0; j < current_.fields[i].caches.size(); j++)
|
||||
@ -691,7 +770,7 @@ void xlsx_pivots_context::Impl::serialize_cache(std::wostream & strm)
|
||||
{
|
||||
CP_XML_NODE(L"fieldGroup")
|
||||
{
|
||||
CP_XML_ATTR(L"base", i);
|
||||
CP_XML_ATTR(L"base", 0);
|
||||
CP_XML_NODE(L"rangePr")
|
||||
{
|
||||
switch(current_.fields[i].type_groups)
|
||||
@ -823,6 +902,8 @@ int xlsx_pivots_context::end_table()
|
||||
std::wstringstream view_strm;
|
||||
std::wstringstream cache_strm;
|
||||
std::wstringstream rec_strm;
|
||||
|
||||
impl_->sort_fields();
|
||||
|
||||
impl_->serialize_view(view_strm);
|
||||
impl_->serialize_cache(cache_strm);
|
||||
@ -973,6 +1054,10 @@ void xlsx_pivots_context::set_field_groups(int type)
|
||||
{
|
||||
impl_->current_.fields.back().type_groups = type + 1;
|
||||
}
|
||||
void xlsx_pivots_context::set_field_groups_source(std::wstring name)
|
||||
{
|
||||
impl_->current_.fields.back().source_groups = name;
|
||||
}
|
||||
void xlsx_pivots_context::set_field_sort(int type)
|
||||
{
|
||||
impl_->current_.fields.back().sort = type + 1;
|
||||
@ -1002,15 +1087,16 @@ void xlsx_pivots_context::add_field_cache(int index, std::wstring value)
|
||||
_CP_OPT(double) dVal;
|
||||
if (pos >= 0)//финановый .. todooo общее правило бы...
|
||||
{
|
||||
value = value.substr(pos + 1);
|
||||
XmlUtils::replace_all(value, L",", L"");
|
||||
XmlUtils::replace_all(value, L" ", L"");
|
||||
XmlUtils::replace_all(value, L"\x00A0", L"");
|
||||
//value = value.substr(pos + 1);
|
||||
//XmlUtils::replace_all(value, L",", L"");
|
||||
//XmlUtils::replace_all(value, L" ", L"");
|
||||
//XmlUtils::replace_all(value, L"\x00A0", L"");
|
||||
}
|
||||
if (oox::IsNumber(value))
|
||||
{
|
||||
try
|
||||
{
|
||||
XmlUtils::replace_all(value, L",", L".");
|
||||
dVal = boost::lexical_cast<double>(value);
|
||||
}
|
||||
catch(...)
|
||||
@ -1021,7 +1107,7 @@ void xlsx_pivots_context::add_field_cache(int index, std::wstring value)
|
||||
{
|
||||
node_name = L"n";
|
||||
|
||||
int iVal = *dVal;
|
||||
_INT64 iVal = *dVal;
|
||||
if (abs(iVal - *dVal) > 0.00001)
|
||||
{
|
||||
value = std::to_wstring(*dVal);
|
||||
|
||||
@ -60,6 +60,7 @@ public:
|
||||
void set_field_data_layout (bool val);
|
||||
void set_field_sort (int type);
|
||||
void set_field_groups (int type);
|
||||
void set_field_groups_source(std::wstring name);
|
||||
void set_repeat_item_labels(bool val);
|
||||
void end_field();
|
||||
|
||||
|
||||
@ -358,7 +358,18 @@ void xlsx_table_state::serialize_page_properties (std::wostream & strm)
|
||||
|
||||
page_layout->xlsx_serialize(strm, *context_);
|
||||
}
|
||||
void xlsx_table_state::serialize_background (std::wostream & strm)
|
||||
{
|
||||
if (tableBackground_.empty()) return;
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"picture")
|
||||
{
|
||||
CP_XML_ATTR(L"r:id", tableBackground_);
|
||||
}
|
||||
}
|
||||
}
|
||||
void xlsx_table_state::serialize_table_format (std::wostream & strm)
|
||||
{
|
||||
odf_reader::odf_read_context & odfContext = context_->root()->odf_context();
|
||||
|
||||
@ -120,10 +120,12 @@ public:
|
||||
xlsx_conditionalFormatting_context & get_conditionalFormatting_context() {return xlsx_conditionalFormatting_context_;}
|
||||
|
||||
void table_column_last_width(double w) { table_column_last_width_ = w; }
|
||||
double table_column_last_width() const { return table_column_last_width_; };
|
||||
double table_column_last_width() const { return table_column_last_width_; };
|
||||
|
||||
void start_hyperlink ();
|
||||
std::wstring end_hyperlink (std::wstring const & ref, std::wstring const & href, std::wstring const & display);
|
||||
std::wstring end_hyperlink (std::wstring const & ref, std::wstring const & href, std::wstring const & display);
|
||||
|
||||
void set_background (std::wstring rId) { tableBackground_ = rId; }
|
||||
|
||||
void serialize_conditionalFormatting (std::wostream & _Wostream);
|
||||
void serialize_table_format (std::wostream & _Wostream);
|
||||
@ -131,6 +133,7 @@ public:
|
||||
void serialize_hyperlinks (std::wostream & _Wostream);
|
||||
void serialize_ole_objects (std::wostream & _Wostream);
|
||||
void serialize_page_properties (std::wostream & _Wostream);
|
||||
void serialize_background (std::wostream & _Wostream);
|
||||
|
||||
void dump_rels_hyperlinks (rels & Rels);
|
||||
void dump_rels_ole_objects (rels & Rels);
|
||||
@ -154,6 +157,7 @@ private:
|
||||
|
||||
std::wstring tableName_;
|
||||
int tableId_;
|
||||
std::wstring tableBackground_;
|
||||
|
||||
std::wstring table_style_;
|
||||
std::wstring table_row_style_;
|
||||
|
||||
@ -320,6 +320,10 @@ void xlsx_table_context::serialize_page_properties(std::wostream & _Wostream)
|
||||
{
|
||||
return state()->serialize_page_properties(_Wostream);
|
||||
}
|
||||
void xlsx_table_context::serialize_background(std::wostream & _Wostream)
|
||||
{
|
||||
return state()->serialize_background(_Wostream);
|
||||
}
|
||||
void xlsx_table_context::serialize_hyperlinks(std::wostream & _Wostream)
|
||||
{
|
||||
return state()->serialize_hyperlinks(_Wostream);
|
||||
|
||||
@ -90,6 +90,7 @@ public:
|
||||
void serialize_hyperlinks (std::wostream & _Wostream);
|
||||
void serialize_ole_objects (std::wostream & _Wostream);
|
||||
void serialize_page_properties (std::wostream & _Wostream);
|
||||
void serialize_background (std::wostream & _Wostream);
|
||||
|
||||
xlsx_table_metrics & get_table_metrics();
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ namespace oox {
|
||||
|
||||
bool IsNumber(const std::wstring &value)
|
||||
{
|
||||
boost::wregex rule(L"\\-?^[0-9]*[.,]?[0-9]*$");
|
||||
boost::wregex rule(L"^\\-{0,1}[0-9]*[.,]{0,1}[0-9]*$");
|
||||
boost::match_results<std::wstring::const_iterator> results;
|
||||
|
||||
return boost::regex_search(value/*.begin(), value.end(), results*/, rule);
|
||||
|
||||
@ -475,9 +475,10 @@ void xlsx_conversion_context::end_table()
|
||||
{
|
||||
CP_XML_ATTR(L"r:id", drawingName.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
get_table_context().serialize_background (current_sheet().drawing());
|
||||
|
||||
}
|
||||
if (!get_comments_context().empty())
|
||||
{
|
||||
std::wstringstream strm;
|
||||
@ -495,7 +496,6 @@ void xlsx_conversion_context::end_table()
|
||||
current_sheet().set_comments_link(commentsName.first, commentsName.second);
|
||||
current_sheet().set_vml_drawing_link(vml_drawingName.first, vml_drawingName.second);
|
||||
}
|
||||
//background picture
|
||||
get_table_context().end_table();
|
||||
}
|
||||
|
||||
@ -547,7 +547,10 @@ int xlsx_conversion_context::current_table_row()
|
||||
|
||||
std::wstring xlsx_conversion_context::current_cell_address()
|
||||
{
|
||||
return oox::getCellAddress(current_table_column(), current_table_row());
|
||||
int col = current_table_column();
|
||||
int row = current_table_row();
|
||||
|
||||
return oox::getCellAddress(col < 0 ? 0 : col, row < 0 ? 0 : row); //under covered cell
|
||||
}
|
||||
|
||||
void xlsx_conversion_context::start_office_spreadsheet(const odf_reader::office_element * elm)
|
||||
|
||||
@ -91,47 +91,47 @@ smil_transition_type smil_transition_type::parse(const std::wstring & Str)
|
||||
std::wstring tmp = Str;
|
||||
boost::algorithm::to_lower(tmp);
|
||||
|
||||
if(tmp == L"barWipe") return smil_transition_type( barWipe );
|
||||
else if(tmp == L"boxWipe") return smil_transition_type( boxWipe );
|
||||
else if(tmp == L"fourboxWipe") return smil_transition_type( fourBoxWipe );
|
||||
else if(tmp == L"barndoorWipe") return smil_transition_type( barnDoorWipe );
|
||||
else if(tmp == L"diagonalWipe") return smil_transition_type( diagonalWipe );
|
||||
else if(tmp == L"bowtieWipe") return smil_transition_type( bowTieWipe );
|
||||
else if(tmp == L"miscdiagonalWipe") return smil_transition_type( miscDiagonalWipe );
|
||||
else if(tmp == L"veeWipe") return smil_transition_type( veeWipe );
|
||||
else if(tmp == L"barnveeWipe") return smil_transition_type( barnVeeWipe );
|
||||
else if(tmp == L"zigzagWipe") return smil_transition_type( zigZagWipe );
|
||||
else if(tmp == L"barnzigzagWipe") return smil_transition_type( barnZigZagWipe );
|
||||
else if(tmp == L"irisWipe") return smil_transition_type( irisWipe);
|
||||
else if(tmp == L"triangleWipe") return smil_transition_type( triangleWipe);
|
||||
else if(tmp == L"arrowheadWipe") return smil_transition_type( arrowHeadWipe );
|
||||
else if(tmp == L"pentagonWipe") return smil_transition_type( pentagonWipe );
|
||||
else if(tmp == L"hexagonWipe") return smil_transition_type( hexagonWipe );
|
||||
else if(tmp == L"ellipseWipe") return smil_transition_type( ellipseWipe );
|
||||
else if(tmp == L"eyeWipe") return smil_transition_type( eyeWipe );
|
||||
else if(tmp == L"roundrectWipe") return smil_transition_type( roundRectWipe );
|
||||
else if(tmp == L"starWipe") return smil_transition_type( starWipe );
|
||||
else if(tmp == L"miscshapeWipe") return smil_transition_type( miscShapeWipe );
|
||||
else if(tmp == L"clockWipe") return smil_transition_type( clockWipe );
|
||||
else if(tmp == L"pinwheelWipe") return smil_transition_type( pinWheelWipe );
|
||||
else if(tmp == L"singlesweepWipe") return smil_transition_type( singleSweepWipe);
|
||||
else if(tmp == L"fanWipe") return smil_transition_type( fanWipe );
|
||||
else if(tmp == L"doublefanWipe") return smil_transition_type( doubleFanWipe );
|
||||
else if(tmp == L"doublesweepWipe") return smil_transition_type( doubleSweepWipe );
|
||||
else if(tmp == L"saloondoorWipe") return smil_transition_type( saloonDoorWipe );
|
||||
else if(tmp == L"windshieldWipe") return smil_transition_type( windshieldWipe );
|
||||
else if(tmp == L"snakeWipe") return smil_transition_type( snakeWipe );
|
||||
else if(tmp == L"spiralWipe") return smil_transition_type( spiralWipe );
|
||||
else if(tmp == L"parallelsnakesWipe")return smil_transition_type( parallelSnakesWipe );
|
||||
else if(tmp == L"boxsnakesWipe") return smil_transition_type( boxSnakesWipe );
|
||||
else if(tmp == L"waterfallWipe") return smil_transition_type( waterfallWipe );
|
||||
else if(tmp == L"pushWipe") return smil_transition_type( pushWipe );
|
||||
else if(tmp == L"slideWipe") return smil_transition_type( slideWipe );
|
||||
if(tmp == L"barwipe") return smil_transition_type( barWipe );
|
||||
else if(tmp == L"boxwipe") return smil_transition_type( boxWipe );
|
||||
else if(tmp == L"fourboxwipe") return smil_transition_type( fourBoxWipe );
|
||||
else if(tmp == L"barndoorwipe") return smil_transition_type( barnDoorWipe );
|
||||
else if(tmp == L"diagonalwipe") return smil_transition_type( diagonalWipe );
|
||||
else if(tmp == L"bowtiewipe") return smil_transition_type( bowTieWipe );
|
||||
else if(tmp == L"miscdiagonalwipe") return smil_transition_type( miscDiagonalWipe );
|
||||
else if(tmp == L"veewipe") return smil_transition_type( veeWipe );
|
||||
else if(tmp == L"barnveewipe") return smil_transition_type( barnVeeWipe );
|
||||
else if(tmp == L"zigzagwipe") return smil_transition_type( zigZagWipe );
|
||||
else if(tmp == L"barnzigzagwipe") return smil_transition_type( barnZigZagWipe );
|
||||
else if(tmp == L"iriswipe") return smil_transition_type( irisWipe);
|
||||
else if(tmp == L"trianglewipe") return smil_transition_type( triangleWipe);
|
||||
else if(tmp == L"arrowheadwipe") return smil_transition_type( arrowHeadWipe );
|
||||
else if(tmp == L"pentagonwipe") return smil_transition_type( pentagonWipe );
|
||||
else if(tmp == L"hexagonwipe") return smil_transition_type( hexagonWipe );
|
||||
else if(tmp == L"ellipsewipe") return smil_transition_type( ellipseWipe );
|
||||
else if(tmp == L"eyewipe") return smil_transition_type( eyeWipe );
|
||||
else if(tmp == L"roundrectwipe") return smil_transition_type( roundRectWipe );
|
||||
else if(tmp == L"starwipe") return smil_transition_type( starWipe );
|
||||
else if(tmp == L"miscshapewipe") return smil_transition_type( miscShapeWipe );
|
||||
else if(tmp == L"clockwipe") return smil_transition_type( clockWipe );
|
||||
else if(tmp == L"pinwheelwipe") return smil_transition_type( pinWheelWipe );
|
||||
else if(tmp == L"singlesweepwipe") return smil_transition_type( singleSweepWipe);
|
||||
else if(tmp == L"fanwipe") return smil_transition_type( fanWipe );
|
||||
else if(tmp == L"doublefanwipe") return smil_transition_type( doubleFanWipe );
|
||||
else if(tmp == L"doublesweepwipe") return smil_transition_type( doubleSweepWipe );
|
||||
else if(tmp == L"saloondoorwipe") return smil_transition_type( saloonDoorWipe );
|
||||
else if(tmp == L"windshieldwipe") return smil_transition_type( windshieldWipe );
|
||||
else if(tmp == L"snakewipe") return smil_transition_type( snakeWipe );
|
||||
else if(tmp == L"spiralwipe") return smil_transition_type( spiralWipe );
|
||||
else if(tmp == L"parallelsnakeswipe")return smil_transition_type( parallelSnakesWipe );
|
||||
else if(tmp == L"boxsnakeswipe") return smil_transition_type( boxSnakesWipe );
|
||||
else if(tmp == L"waterfallwipe") return smil_transition_type( waterfallWipe );
|
||||
else if(tmp == L"pushwipe") return smil_transition_type( pushWipe );
|
||||
else if(tmp == L"slidewipe") return smil_transition_type( slideWipe );
|
||||
else if(tmp == L"fade") return smil_transition_type( fade );
|
||||
else if(tmp == L"checkerboardWipe") return smil_transition_type( checkerBoardWipe);
|
||||
else if(tmp == L"blindsWipe") return smil_transition_type( blindsWipe);
|
||||
else if(tmp == L"checkerboardwipe") return smil_transition_type( checkerBoardWipe);
|
||||
else if(tmp == L"blindswipe") return smil_transition_type( blindsWipe);
|
||||
else if(tmp == L"dissolve") return smil_transition_type( dissolve);
|
||||
else if(tmp == L"randombarWipe") return smil_transition_type( randomBarWipe);
|
||||
else if(tmp == L"randombarwipe") return smil_transition_type( randomBarWipe);
|
||||
else
|
||||
{
|
||||
return smil_transition_type( barWipe );
|
||||
|
||||
@ -754,7 +754,7 @@ int ComputeMarginY(const style_page_layout_properties_attlist & pageProperties,
|
||||
|
||||
}
|
||||
|
||||
void common_draw_docx_convert(oox::docx_conversion_context & Context, const union_common_draw_attlists & attlists_, oox::_docx_drawing *drawing)
|
||||
void common_draw_docx_convert(oox::docx_conversion_context & Context, union_common_draw_attlists & attlists_, oox::_docx_drawing *drawing)
|
||||
{
|
||||
const std::wstring styleName = attlists_.shape_with_text_and_styles_.
|
||||
common_shape_draw_attlist_.draw_style_name_.get_value_or(L"");
|
||||
@ -899,7 +899,16 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, const unio
|
||||
}
|
||||
}
|
||||
///////////////////////////
|
||||
|
||||
if (attlists_.rel_size_.common_draw_size_attlist_.svg_width_)
|
||||
{
|
||||
double w_shape = attlists_.rel_size_.common_draw_size_attlist_.svg_width_->get_value_unit(length::pt);
|
||||
if (w_shape < 1) attlists_.rel_size_.common_draw_size_attlist_.svg_width_ = length(1, length::pt);
|
||||
}
|
||||
if (attlists_.rel_size_.common_draw_size_attlist_.svg_height_)
|
||||
{
|
||||
double h_shape = attlists_.rel_size_.common_draw_size_attlist_.svg_height_->get_value_unit(length::pt);
|
||||
if (h_shape < 1) attlists_.rel_size_.common_draw_size_attlist_.svg_height_ = length(1, length::pt);
|
||||
}
|
||||
drawing->x = get_value_emu(attlists_.position_.svg_x_);
|
||||
drawing->y = get_value_emu(attlists_.position_.svg_y_);
|
||||
|
||||
|
||||
@ -298,6 +298,8 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
shape->additional_.push_back(odf_reader::_property(L"custom_path", output_.str()));
|
||||
|
||||
set_shape = true;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.drawooo_sub_view_size_)
|
||||
{
|
||||
@ -306,8 +308,8 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
|
||||
if (splitted.size() == 2)
|
||||
{
|
||||
int w = boost::lexical_cast<int>(splitted[0]);
|
||||
int h = boost::lexical_cast<int>(splitted[1]);
|
||||
w = boost::lexical_cast<int>(splitted[0]);
|
||||
h = boost::lexical_cast<int>(splitted[1]);
|
||||
|
||||
shape->additional_.push_back(odf_reader::_property(L"custom_path_w", w));
|
||||
shape->additional_.push_back(odf_reader::_property(L"custom_path_h", h));
|
||||
@ -320,6 +322,17 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
int b = boost::lexical_cast<int>(splitted[3]);
|
||||
|
||||
}
|
||||
|
||||
//if (shape->common_draw_attlists_.rel_size_.common_draw_size_attlist_.svg_width_)
|
||||
//{
|
||||
// int w_shape = shape->common_draw_attlists_.rel_size_.common_draw_size_attlist_.svg_width_->get_value();
|
||||
// if (w_shape < 1) shape->common_draw_attlists_.rel_size_.common_draw_size_attlist_.svg_width_ = length(1, length::pt);
|
||||
//}
|
||||
//if (shape->common_draw_attlists_.rel_size_.common_draw_size_attlist_.svg_height_)
|
||||
//{
|
||||
// int h_shape = shape->common_draw_attlists_.rel_size_.common_draw_size_attlist_.svg_height_->get_value();
|
||||
// if (h_shape < 1) shape->common_draw_attlists_.rel_size_.common_draw_size_attlist_.svg_height_ = length(1, length::pt);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "math_layout_elements.h"
|
||||
#include "math_token_elements.h"
|
||||
#include "style_text_properties.h"
|
||||
#include "math_limit_elements.h"
|
||||
|
||||
#include <cpdoccore/xml/xmlchar.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
@ -95,6 +96,7 @@ void math_mrow::oox_convert(oox::math_context & Context)
|
||||
bDPr = true;
|
||||
}
|
||||
|
||||
bool need_e_old = Context.is_need_e_, need_e = false;
|
||||
if (bDPr)
|
||||
{
|
||||
Context.output_stream() << L"<m:d>";
|
||||
@ -114,20 +116,31 @@ void math_mrow::oox_convert(oox::math_context & Context)
|
||||
}
|
||||
Context.output_stream() << Context.math_style_stream().str();
|
||||
Context.output_stream() << L"</m:dPr>";
|
||||
Context.output_stream() << L"<m:e>";
|
||||
|
||||
need_e = true;
|
||||
}
|
||||
else need_e = Context.is_need_e_;
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
if (need_e)
|
||||
{
|
||||
Context.output_stream() << L"<m:e>";
|
||||
}
|
||||
|
||||
for (int i = i_start; i < i_end ; i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
}
|
||||
|
||||
if (need_e)
|
||||
{
|
||||
Context.output_stream() << L"</m:e>";
|
||||
}
|
||||
if (bDPr)
|
||||
{
|
||||
Context.output_stream() << L"</m:e>";
|
||||
Context.output_stream() << L"</m:d>";
|
||||
}
|
||||
Context.is_need_e_ = need_e_old;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
const wchar_t * math_mfrac::ns = L"math";
|
||||
@ -149,13 +162,23 @@ void math_mfrac::oox_convert(oox::math_context & Context)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool need_e = Context.is_need_e_;
|
||||
if (need_e)
|
||||
{
|
||||
Context.output_stream() << L"<m:e>";
|
||||
}
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
office_math_element* math_element = NULL;
|
||||
|
||||
Context.output_stream() << L"<m:f>";
|
||||
Context.output_stream() << L"<m:num>";
|
||||
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
Context.output_stream() << L"</m:num>";
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
Context.output_stream() << L"<m:den>";
|
||||
math_element = dynamic_cast<office_math_element*>(content_[1].get());
|
||||
@ -163,6 +186,12 @@ void math_mfrac::oox_convert(oox::math_context & Context)
|
||||
Context.output_stream() << L"</m:den>";
|
||||
|
||||
Context.output_stream() << L"</m:f>";
|
||||
|
||||
if (need_e)
|
||||
{
|
||||
Context.output_stream() << L"</m:e>";
|
||||
}
|
||||
Context.is_need_e_ = need_e;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
const wchar_t * math_msqrt::ns = L"math";
|
||||
@ -191,6 +220,8 @@ void math_msqrt::oox_convert(oox::math_context & Context)
|
||||
strm << L"<m:deg/>";
|
||||
|
||||
strm << L"<m:e>";
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
for (size_t i = 0 ; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
@ -229,6 +260,9 @@ void math_mroot::oox_convert(oox::math_context & Context)
|
||||
math_element = dynamic_cast<office_math_element*>(content_[1].get());
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:deg>";
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
strm << L"<m:e>";
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
@ -294,11 +328,26 @@ void math_mstyle::oox_convert(oox::math_context & Context)
|
||||
}
|
||||
}
|
||||
}
|
||||
bool need_e_old = Context.is_need_e_;
|
||||
Context.is_need_e_ = content_.size() > 1 ? true : need_e_old;
|
||||
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
//math_munder* munder_test = dynamic_cast<math_munder*>(content_[i].get());
|
||||
//math_mfrac* frac_test = dynamic_cast<math_mfrac*>(content_[i].get());
|
||||
//math_mrow* row_test = dynamic_cast<math_mrow*>(content_[i].get());
|
||||
|
||||
//if (row_test || munder_test || frac_test)
|
||||
// Context.output_stream() << L"<m:e>";
|
||||
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
math_element->oox_convert(Context);
|
||||
|
||||
//if (row_test || munder_test || frac_test)
|
||||
// Context.output_stream() << L"</m:e>";
|
||||
|
||||
//office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
//math_element->oox_convert(Context);
|
||||
}
|
||||
//reset to default math text props
|
||||
Context.text_properties_ = odf_reader::style_text_properties_ptr(new odf_reader::style_text_properties());
|
||||
@ -306,6 +355,7 @@ void math_mstyle::oox_convert(oox::math_context & Context)
|
||||
Context.text_properties_->content().style_font_name_ = L"Cambria Math";
|
||||
Context.text_properties_->content().fo_font_size_ = odf_types::length(Context.base_font_size_, odf_types::length::pt);
|
||||
|
||||
Context.is_need_e_ = need_e_old;
|
||||
{
|
||||
std::wstringstream & strm = Context.math_style_stream();
|
||||
strm.str( std::wstring() );
|
||||
|
||||
@ -71,11 +71,15 @@ void math_msub::oox_convert(oox::math_context & Context)
|
||||
strm << L"<m:sSub>";
|
||||
|
||||
strm << L"<m:e>";
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:e>";
|
||||
|
||||
strm << L"<m:sub>";
|
||||
Context.is_need_e_ = false; //??
|
||||
|
||||
math_element = dynamic_cast<office_math_element*>(content_[1].get());
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:sub>";
|
||||
@ -109,6 +113,8 @@ void math_msup::oox_convert(oox::math_context & Context)
|
||||
strm << L"<m:sSup>";
|
||||
|
||||
strm << L"<m:e>";
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:e>";
|
||||
@ -142,6 +148,8 @@ void math_msubsup::oox_convert(oox::math_context & Context)
|
||||
office_math_element* math_element = NULL;
|
||||
|
||||
strm << L"<m:sSubSup>";
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
strm << L"<m:e>";
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
@ -328,6 +336,9 @@ void math_mover::oox_convert(oox::math_context & Context)
|
||||
strm << L"<m:limUpp>";
|
||||
strm << L"<m:limUppPr/>";
|
||||
strm << L"<m:e>";
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:e>";
|
||||
@ -355,6 +366,13 @@ void math_munder::oox_convert(oox::math_context & Context)
|
||||
{//2 elements
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
bool need_e = Context.is_need_e_;
|
||||
if (need_e)
|
||||
{
|
||||
Context.output_stream() << L"<m:e>";
|
||||
}
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
office_math_element* math_element = NULL;
|
||||
strm << L"<m:limLow>";
|
||||
strm << L"<m:limLowPr/>";
|
||||
@ -367,6 +385,12 @@ void math_munder::oox_convert(oox::math_context & Context)
|
||||
math_element->oox_convert(Context);
|
||||
strm << L"</m:lim>";
|
||||
strm << L"</m:limLow>";
|
||||
|
||||
if (need_e)
|
||||
{
|
||||
Context.output_stream() << L"</m:e>";
|
||||
}
|
||||
Context.is_need_e_ = need_e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
|
||||
#include "math_table_elements.h"
|
||||
#include "math_layout_elements.h"
|
||||
#include "math_limit_elements.h"
|
||||
|
||||
#include <cpdoccore/xml/xmlchar.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
@ -91,19 +92,30 @@ void math_mtr::oox_convert(oox::math_context & Context)
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
strm << L"<m:mr>";
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
math_mrow* mrow_test = dynamic_cast<math_mrow*>(content_[i].get());
|
||||
if (mrow_test)
|
||||
Context.output_stream() << L"<m:e>";// EqArray записался в числитель вместо знаменателя.docx - дублирование
|
||||
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
|
||||
if (mrow_test)
|
||||
strm << L"</m:e>";
|
||||
}
|
||||
bool need_e_old = Context.is_need_e_;
|
||||
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
//Context.is_need_e_ = content_.size() > 1 ? true : false;
|
||||
Context.is_need_e_ = true;
|
||||
|
||||
//math_mrow* row_test = dynamic_cast<math_mrow*>(content_[i].get());
|
||||
//math_munder* munder_test = dynamic_cast<math_munder*>(content_[i].get());
|
||||
//math_mfrac* frac_test = dynamic_cast<math_mfrac*>(content_[i].get());
|
||||
//
|
||||
//if (row_test || munder_test || frac_test)
|
||||
// Context.output_stream() << L"<m:e>";// EqArray записался в числитель вместо знаменателя.docx - дублирование
|
||||
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
math_element->oox_convert(Context);
|
||||
|
||||
//if (row_test || munder_test || frac_test)
|
||||
// strm << L"</m:e>";
|
||||
}
|
||||
strm << L"</m:mr>";
|
||||
|
||||
Context.is_need_e_ = need_e_old;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -146,6 +158,7 @@ void math_mtd::oox_convert(oox::math_context & Context)
|
||||
std::wostream & strm = Context.output_stream();
|
||||
|
||||
strm << L"<m:e>";
|
||||
Context.is_need_e_ = false;
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
office_math_element* math_element = dynamic_cast<office_math_element*>(content_[i].get());
|
||||
|
||||
@ -283,7 +283,12 @@ void math_mtext::add_text(const std::wstring & Text)
|
||||
|
||||
void math_mtext::oox_convert(oox::math_context & Context)
|
||||
{
|
||||
|
||||
if (text_)
|
||||
{
|
||||
Context.output_stream() << L"<m:r><m:rPr><m:nor/></m:rPr><m:t>";
|
||||
Context.output_stream() << XmlUtils::EncodeXmlString(*text_);
|
||||
Context.output_stream() << L"</m:t></m:r>";
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
const wchar_t * math_mglyph::ns = L"math";
|
||||
|
||||
@ -331,7 +331,7 @@ void page_layout_instance::xlsx_serialize(std::wostream & strm, oox::xlsx_conver
|
||||
props->xlsx_serialize(strm, Context);
|
||||
}
|
||||
|
||||
void page_layout_instance::docx_convert_serialize(std::wostream & strm, oox::docx_conversion_context & Context)
|
||||
void page_layout_instance::docx_serialize(std::wostream & strm, oox::docx_conversion_context & Context)
|
||||
{
|
||||
const style_header_style * headerStyle = dynamic_cast<style_header_style *>(style_page_layout_->style_header_style_.get());
|
||||
const style_footer_style * footerStyle = dynamic_cast<style_footer_style *>(style_page_layout_->style_footer_style_.get());
|
||||
@ -357,7 +357,7 @@ void page_layout_instance::docx_convert_serialize(std::wostream & strm, oox::doc
|
||||
|
||||
style_page_layout_properties * props = properties();
|
||||
if (props)
|
||||
props->docx_convert_serialize(strm, Context);
|
||||
props->docx_serialize(strm, Context);
|
||||
}
|
||||
void page_layout_instance::pptx_serialize(std::wostream & strm, oox::pptx_conversion_context & Context)
|
||||
{
|
||||
|
||||
@ -193,9 +193,9 @@ public:
|
||||
const std::wstring & name() const;
|
||||
style_page_layout_properties * properties() const;
|
||||
|
||||
void docx_convert_serialize (std::wostream & strm, oox::docx_conversion_context & Context);
|
||||
void xlsx_serialize (std::wostream & strm, oox::xlsx_conversion_context & Context);
|
||||
void pptx_serialize (std::wostream & strm, oox::pptx_conversion_context & Context);
|
||||
void docx_serialize (std::wostream & strm, oox::docx_conversion_context & Context);
|
||||
void pptx_serialize (std::wostream & strm, oox::pptx_conversion_context & Context);
|
||||
void xlsx_serialize (std::wostream & strm, oox::xlsx_conversion_context & Context);
|
||||
|
||||
const style_page_layout * style_page_layout_;
|
||||
|
||||
|
||||
@ -40,9 +40,10 @@
|
||||
#include "serialize_elements.h"
|
||||
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include "../odf/odfcontext.h"
|
||||
#include "odfcontext.h"
|
||||
|
||||
#include "../odf/calcs_styles.h"
|
||||
#include "calcs_styles.h"
|
||||
#include "../docx/xlsx_utils.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -215,8 +216,12 @@ void office_annotation::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
const std::wstring textStyleName = office_annotation_attr_.draw_text_style_name_.get_value_or(L"");
|
||||
|
||||
std::wstring ref = Context.current_cell_address();
|
||||
Context.get_comments_context().end_comment(ref,Context.current_table_column(), Context.current_table_row());
|
||||
int col = Context.current_table_column(); if (col < 0) col = 0;
|
||||
int row = Context.current_table_row(); if (row < 0) row = 0;
|
||||
|
||||
std::wstring ref = oox::getCellAddress(col, row);
|
||||
|
||||
Context.get_comments_context().end_comment(ref, col, row);
|
||||
}
|
||||
// officeooo:annotation
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -152,7 +152,7 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
if (page_layout_instance * lastPageLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_by_name(Context.get_page_properties()))
|
||||
{
|
||||
lastPageLayout->docx_convert_serialize(Context.output_stream(), Context);
|
||||
lastPageLayout->docx_serialize(Context.output_stream(), Context);
|
||||
//Context.remove_page_properties();
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,20 +90,38 @@ void text::docx_convert(oox::docx_conversion_context & Context)
|
||||
Context.get_delete_text_state())
|
||||
return; //в ms нет рецензирования notes
|
||||
|
||||
Context.add_element_to_run();
|
||||
std::wostream & strm = Context.output_stream();
|
||||
bool add_del_run = false;
|
||||
if (Context.get_drawing_state_content() && Context.get_delete_text_state())
|
||||
{ //0503IG-AddingFormattingText.odt - удаленый текст в удаленом объекте
|
||||
|
||||
oox::text_tracked_context::_state &state = Context.get_text_tracked_context().get_tracked_change(L"");
|
||||
if (state.type == 2)
|
||||
{
|
||||
add_del_run = true;
|
||||
Context.output_stream() << L"<w:del>";
|
||||
}
|
||||
}
|
||||
|
||||
Context.add_element_to_run();
|
||||
|
||||
std::wstring textNode = L"w:t";
|
||||
|
||||
if (Context.get_delete_text_state()) textNode = L"w:delText";
|
||||
|
||||
strm << L"<" << textNode;
|
||||
Context.output_stream() << L"<" << textNode;
|
||||
if (preserve_ && !Context.get_delete_text_state())
|
||||
strm << L" xml:space=\"preserve\"";
|
||||
strm << L">";
|
||||
Context.output_stream() << L" xml:space=\"preserve\"";
|
||||
Context.output_stream() << L">";
|
||||
|
||||
Context.output_stream() << xml::utils::replace_text_to_xml( text_ );
|
||||
Context.output_stream() << L"</" << textNode << L">";
|
||||
|
||||
if (add_del_run)
|
||||
{
|
||||
Context.finish_run();
|
||||
Context.output_stream() << L"</w:del>";
|
||||
}
|
||||
|
||||
strm << xml::utils::replace_text_to_xml( text_ );
|
||||
strm << L"</" << textNode << L">";
|
||||
}
|
||||
|
||||
void text::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
|
||||
@ -407,7 +407,7 @@ void text_format_properties_content::drawing_serialize(std::wostream & strm, std
|
||||
switch (style_text_underline_style_->get_type())
|
||||
{
|
||||
case line_style::Solid:
|
||||
if (underlineBold) underline = L"thick";
|
||||
if (underlineBold) underline = L"heavy";
|
||||
else underline = L"sng";
|
||||
break;
|
||||
case line_style::Dotted:
|
||||
|
||||
@ -1254,7 +1254,6 @@ bool style_page_layout_properties::docx_background_serialize(std::wostream & str
|
||||
void style_page_layout_properties::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
}
|
||||
|
||||
void style_page_layout_properties::xlsx_serialize(std::wostream & strm, oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
@ -1319,31 +1318,28 @@ void style_page_layout_properties::xlsx_serialize(std::wostream & strm, oox::xls
|
||||
}
|
||||
}
|
||||
}
|
||||
if (elements_.style_background_image_)
|
||||
}
|
||||
if (elements_.style_background_image_)
|
||||
{
|
||||
oox::_oox_fill fill;
|
||||
|
||||
Compute_GraphicFill(attlist_.common_draw_fill_attlist_, elements_.style_background_image_, Context.root()->odf_context().drawStyles(), fill);
|
||||
if (fill.bitmap)
|
||||
{
|
||||
oox::_oox_fill fill;
|
||||
|
||||
Compute_GraphicFill(attlist_.common_draw_fill_attlist_, elements_.style_background_image_, Context.root()->odf_context().drawStyles(), fill);
|
||||
if (fill.bitmap)
|
||||
if ( fill.bitmap->rId.empty())
|
||||
{
|
||||
if ( fill.bitmap->rId.empty())
|
||||
{
|
||||
std::wstring href = fill.bitmap->xlink_href_;
|
||||
fill.bitmap->rId = Context.get_mediaitems().add_or_find(href, oox::typeImage, fill.bitmap->isInternal, href);
|
||||
std::wstring href = fill.bitmap->xlink_href_;
|
||||
fill.bitmap->rId = Context.get_mediaitems().add_or_find(href, oox::typeImage, fill.bitmap->isInternal, href);
|
||||
|
||||
Context.get_drawing_context().get_drawings()->add(fill.bitmap->isInternal, fill.bitmap->rId, href, oox::typeImage, true);
|
||||
}
|
||||
Context.get_drawing_context().get_drawings()->add(fill.bitmap->isInternal, fill.bitmap->rId, href, oox::typeImage, true);
|
||||
}
|
||||
|
||||
CP_XML_NODE(L"picture")
|
||||
{
|
||||
CP_XML_ATTR(L"r:id", fill.bitmap->rId );
|
||||
}
|
||||
}
|
||||
}
|
||||
Context.get_table_context().state()->set_background(fill.bitmap->rId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void style_page_layout_properties::docx_convert_serialize(std::wostream & strm, oox::docx_conversion_context & Context)
|
||||
void style_page_layout_properties::docx_serialize(std::wostream & strm, oox::docx_conversion_context & Context)
|
||||
{
|
||||
style_columns * columns = dynamic_cast<style_columns *>( elements_.style_columns_.get());
|
||||
|
||||
|
||||
@ -975,11 +975,12 @@ public:
|
||||
static const ElementType type = typeStylePageLayout;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
void docx_convert_serialize (std::wostream & strm, oox::docx_conversion_context & Context);
|
||||
void pptx_convert (oox::pptx_conversion_context & Context);
|
||||
void xlsx_convert (oox::xlsx_conversion_context & Context);
|
||||
|
||||
bool docx_background_serialize(std::wostream & strm, oox::docx_conversion_context & Context, oox::_oox_fill & fill, int id);
|
||||
|
||||
void docx_serialize (std::wostream & strm, oox::docx_conversion_context & Context);
|
||||
void xlsx_serialize(std::wostream & strm, oox::xlsx_conversion_context & Context);
|
||||
void pptx_serialize(std::wostream & strm, oox::pptx_conversion_context & Context);
|
||||
|
||||
|
||||
@ -790,7 +790,7 @@ namespace svg_path
|
||||
}
|
||||
}
|
||||
|
||||
if ((aCurrPoly.points.size() > 0 || !bIsClosed) && !aCurrPoly.command.empty() && aCurrPoly.command != L"a:cubicBezTo")
|
||||
if ((aCurrPoly.points.size() > 0/* || !bIsClosed*/) && !aCurrPoly.command.empty() && aCurrPoly.command != L"a:cubicBezTo")
|
||||
{
|
||||
// end-process last poly
|
||||
|
||||
|
||||
@ -406,6 +406,10 @@ void table_data_pilot_groups::xlsx_convert(oox::xlsx_conversion_context & Contex
|
||||
if (table_grouped_by_)
|
||||
Context.get_pivots_context().set_field_groups(table_grouped_by_->get_type());
|
||||
|
||||
if (table_source_field_name_)
|
||||
Context.get_pivots_context().set_field_groups_source(*table_source_field_name_);
|
||||
|
||||
|
||||
for (size_t i = 0; i < content_.size(); i++)
|
||||
{
|
||||
content_[i]->xlsx_convert(Context);
|
||||
|
||||
@ -174,7 +174,8 @@ namespace PPTX
|
||||
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
|
||||
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
|
||||
BinDocxRW::CDocxSerializer* old_serial = pWriter->m_pMainDocument;
|
||||
|
||||
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = pWriter;
|
||||
oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(pWriter, &oFontProcessor, &oDrawingConverter, NULL);
|
||||
|
||||
@ -189,6 +190,7 @@ namespace PPTX
|
||||
oDrawingConverter.m_pBinaryWriter = old_writer;
|
||||
*pWriter->m_pCurrentContainer = old_rels;
|
||||
pWriter->m_pMainDocument = old_serial;
|
||||
*pWriter->m_pTheme = old_theme;
|
||||
}
|
||||
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX ||
|
||||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM)
|
||||
@ -201,9 +203,10 @@ namespace PPTX
|
||||
DocWrapper::FontProcessor fp;
|
||||
NSBinPptxRW::CDrawingConverter oDrawingConverter;
|
||||
|
||||
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
|
||||
NSBinPptxRW::CBinaryFileWriter* old_writer = oDrawingConverter.m_pBinaryWriter;
|
||||
NSCommon::smart_ptr<OOX::IFileContainer> old_rels = *pWriter->m_pCurrentContainer;
|
||||
|
||||
NSCommon::smart_ptr<PPTX::Theme> old_theme = *pWriter->m_pTheme;
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = pWriter;
|
||||
|
||||
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(fp);
|
||||
@ -215,7 +218,8 @@ namespace PPTX
|
||||
|
||||
oDrawingConverter.m_pBinaryWriter = old_writer;
|
||||
*pWriter->m_pCurrentContainer = old_rels;
|
||||
}
|
||||
*pWriter->m_pTheme = old_theme;
|
||||
}
|
||||
//else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX)
|
||||
//{
|
||||
//}
|
||||
|
||||
@ -1922,7 +1922,7 @@
|
||||
17063B5B1AC5708E0056A3F1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0730;
|
||||
ORGANIZATIONNAME = "Ascensio System SIA";
|
||||
};
|
||||
buildConfigurationList = 17063B5E1AC5708E0056A3F1 /* Build configuration list for PBXProject "PPTXFormatLib" */;
|
||||
@ -2004,21 +2004,13 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -2026,7 +2018,6 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@ -2039,7 +2030,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
@ -2055,21 +2046,13 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -2077,14 +2060,13 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
|
||||
@ -394,7 +394,7 @@
|
||||
6967B1211E27B44D00A129E2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = OnlyOffce;
|
||||
TargetAttributes = {
|
||||
6967B1281E27B44D00A129E2 = {
|
||||
@ -468,9 +468,7 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
@ -478,11 +476,7 @@
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@ -505,7 +499,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@ -521,9 +515,7 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
@ -531,11 +523,7 @@
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@ -552,7 +540,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
|
||||
@ -44,10 +44,67 @@ HRESULT ConvertOle1ToOle2(BYTE *pData, int nSize, std::wstring sOle2Name)
|
||||
|
||||
Ole1FormatReader ole1Reader(pData, nSize);
|
||||
|
||||
NSFile::CFileBinary file;
|
||||
file.CreateFileW(sOle2Name);
|
||||
file.WriteFile(ole1Reader.NativeData, ole1Reader.NativeDataSize);
|
||||
file.CloseFile();
|
||||
if (ole1Reader.NativeDataSize > 0)
|
||||
{
|
||||
POLE::Storage * storageOut = new POLE::Storage(sOle2Name.c_str());
|
||||
if ( (storageOut) && (storageOut->open(true, true)))
|
||||
{
|
||||
_UINT32 tmp = 0;
|
||||
std::string name = ole1Reader.Header.ClassName.val;
|
||||
_UINT32 name_size = name.length() + 1;
|
||||
//Ole
|
||||
BYTE dataOleInfo[] = {0x01,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||
POLE::Stream oStream3(storageOut, "\001Ole", true, 20);
|
||||
oStream3.write(dataOleInfo, 20);
|
||||
oStream3.flush();
|
||||
//CompObj
|
||||
BYTE dataCompObjHeader[28] = {0x01,0x00,0xfe,0xff,0x03,0x0a,0x00,0x00,0xff,0xff,0xff,0xff,0x0a,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46};
|
||||
POLE::Stream oStream1(storageOut, "\001CompObj", true, 28 + (name_size + 5) + 2 * (ole1Reader.Header.ClassName.size + 4) + 4 * 4);
|
||||
oStream1.write(dataCompObjHeader, 28);
|
||||
|
||||
oStream1.write((BYTE*)&name_size, 4);
|
||||
oStream1.write((BYTE*)name.c_str(), name_size);
|
||||
|
||||
//oStream1.write((BYTE*)&ole1Reader.Header.ClassName.size, 4);
|
||||
//oStream1.write((BYTE*)ole1Reader.Header.ClassName.val.c_str(), ole1Reader.Header.ClassName.size);
|
||||
|
||||
oStream1.write((BYTE*)&ole1Reader.Header.ClassName.size, 4);
|
||||
oStream1.write((BYTE*)ole1Reader.Header.ClassName.val.c_str(), ole1Reader.Header.ClassName.size);
|
||||
oStream1.write((BYTE*)&ole1Reader.Header.ClassName.size, 4);
|
||||
oStream1.write((BYTE*)ole1Reader.Header.ClassName.val.c_str(), ole1Reader.Header.ClassName.size);
|
||||
|
||||
tmp = 0x71B239F4;
|
||||
oStream1.write((BYTE*)&tmp, 4); // UnicodeMarker
|
||||
|
||||
tmp = 0;
|
||||
oStream1.write((BYTE*)&tmp, 4); // UnicodeUserType
|
||||
oStream1.write((BYTE*)&tmp, 4); // UnicodeClipboardFormat
|
||||
oStream1.write((BYTE*)&tmp, 4); //
|
||||
oStream1.flush();
|
||||
|
||||
//ObjInfo
|
||||
BYTE dataObjInfo[] = {0x00,0x00,0x03,0x00,0x04,0x00};
|
||||
POLE::Stream oStream2(storageOut, "\003ObjInfo", true, 6);
|
||||
oStream2.write(dataObjInfo, 6);
|
||||
oStream2.flush();
|
||||
//Ole10Native
|
||||
POLE::Stream streamData(storageOut, "\001Ole10Native", true, ole1Reader.NativeDataSize + 4);
|
||||
streamData.write((BYTE*)&ole1Reader.NativeDataSize, 4);
|
||||
streamData.write(ole1Reader.NativeData, ole1Reader.NativeDataSize);
|
||||
streamData.flush();
|
||||
|
||||
storageOut->close();
|
||||
delete storageOut;
|
||||
}
|
||||
}
|
||||
else //conv_NI38P7GBIpw1aD84H3k.rtf
|
||||
{
|
||||
NSFile::CFileBinary file;
|
||||
|
||||
file.CreateFileW(sOle2Name);
|
||||
file.WriteFile(pData, nSize);
|
||||
file.CloseFile();
|
||||
}
|
||||
return S_FALSE;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -817,8 +874,7 @@ bool RtfShadingRowCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRe
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
bool RtfCharPropsCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter, RtfCharProperty * charProps, bool bLookOnBorder)
|
||||
{
|
||||
if (!charProps) return false;
|
||||
@ -1645,7 +1701,64 @@ bool RtfFieldInstReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oRead
|
||||
return RtfParagraphPropDestination::ExecuteCommand( oDocument, oReader, (*this), sCommand, hasParameter, parameter );
|
||||
}
|
||||
}
|
||||
bool RtfOleBinReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter)
|
||||
{
|
||||
if ( "objdata" == sCommand )
|
||||
return true;
|
||||
|
||||
if ( "bin" == sCommand ) // from RtfOleReader - conv_NI38P7GBIpw1aD84H3k.rtf
|
||||
{
|
||||
int nDataSize = 0;
|
||||
if ( hasParameter )
|
||||
nDataSize = parameter;
|
||||
|
||||
BYTE *pData = NULL;
|
||||
|
||||
oReader.m_oLex.ReadBytes( parameter, &pData );
|
||||
|
||||
m_arData.push_back(std::string((char*)pData, nDataSize));
|
||||
|
||||
RELEASEOBJECT(pData);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void RtfOleBinReader::ExecuteText(RtfDocument& oDocument, RtfReader& oReader, std::wstring sText)
|
||||
{
|
||||
m_arData.push_back(std::string(sText.begin(), sText.end()));
|
||||
}
|
||||
void RtfOleBinReader::GetData( BYTE** ppData, long& nSize)
|
||||
{
|
||||
nSize = 0;
|
||||
size_t pos = 0, start = 0, nSizeRead = 0;
|
||||
|
||||
if (m_arData.size() > 1)
|
||||
{
|
||||
nSizeRead = *((short*)m_arData[0].c_str());
|
||||
start = 1; // first content all size
|
||||
}
|
||||
for (size_t i = start; i < m_arData.size(); i++)
|
||||
{
|
||||
nSize += m_arData[i].length();
|
||||
}
|
||||
|
||||
(*ppData) = new BYTE[ nSize];
|
||||
|
||||
for (size_t i = start; i < m_arData.size(); i++)
|
||||
{
|
||||
BYTE *buf = (BYTE*)m_arData[i].c_str();
|
||||
|
||||
for (size_t j = 0; j < m_arData[i].length(); j += 2)
|
||||
{
|
||||
BYTE nByte = 0;
|
||||
|
||||
nByte = RtfUtility::ToByte(buf[ j ]) << 4;
|
||||
nByte |= RtfUtility::ToByte(buf[ j + 1]);
|
||||
|
||||
(*ppData)[pos++] = nByte;
|
||||
}
|
||||
}
|
||||
nSize = pos;
|
||||
}
|
||||
bool RtfOleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter)
|
||||
{
|
||||
if ( "object" == sCommand )
|
||||
@ -1663,13 +1776,15 @@ bool RtfOleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, st
|
||||
}
|
||||
else if ( "objdata" == sCommand )
|
||||
{
|
||||
std::wstring sOleData;
|
||||
TextReader oTextReader( sOleData, false );
|
||||
StartSubReader( oTextReader, oDocument, oReader );
|
||||
RtfOleBinReader oBinReader;
|
||||
|
||||
StartSubReader( oBinReader, oDocument, oReader );
|
||||
|
||||
BYTE *pData = NULL;
|
||||
long nSize = 0;
|
||||
RtfUtility::WriteDataToBinary( sOleData, &pData, nSize );
|
||||
|
||||
oBinReader.GetData(&pData, nSize );
|
||||
|
||||
if ( 0 != nSize && pData)
|
||||
{
|
||||
HRESULT hRes = S_FALSE;
|
||||
@ -1689,7 +1804,7 @@ bool RtfOleReader::ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, st
|
||||
std::wstring sOleStorageName = Utils::CreateTempFile( oReader.m_sTempFolder );
|
||||
|
||||
IStorage* piMSStorage = NULL;
|
||||
if ( SUCCEEDED( StgCreateDocfile( sOleStorageName, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED/* | STGM_DELETEONRELEASE*/, NULL, &piMSStorage) ) )
|
||||
if ( SUCCEEDED( StgCreateDocfile( sOleStorageName.c_str(), STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED/* | STGM_DELETEONRELEASE*/, NULL, &piMSStorage) ) )
|
||||
{
|
||||
hRes = OleConvertOLESTREAMToIStorage( &oStream, piMSStorage, NULL );
|
||||
piMSStorage->Commit( STGC_DEFAULT );
|
||||
|
||||
@ -109,13 +109,13 @@ public:
|
||||
}
|
||||
};
|
||||
//class RtfOldList;
|
||||
class TextReader: public RtfAbstractReader
|
||||
class TextReader : public RtfAbstractReader
|
||||
{
|
||||
private:
|
||||
std::wstring& m_sName;
|
||||
bool m_bErease;
|
||||
bool m_bErease;
|
||||
public:
|
||||
TextReader( std::wstring& sName, bool bErease = true ):m_sName(sName),m_bErease(bErease)
|
||||
TextReader( std::wstring& sName, bool bErease = true ) : m_sName(sName), m_bErease(bErease)
|
||||
{
|
||||
}
|
||||
void ExecuteText(RtfDocument& oDocument, RtfReader& oReader, std::wstring sText)
|
||||
@ -782,6 +782,20 @@ public:
|
||||
bool ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter);
|
||||
};
|
||||
|
||||
class RtfOleBinReader : public RtfAbstractReader
|
||||
{
|
||||
private:
|
||||
std::vector<std::string>/*&*/ m_arData;
|
||||
public:
|
||||
RtfOleBinReader()
|
||||
{
|
||||
}
|
||||
bool ExecuteCommand(RtfDocument& oDocument, RtfReader& oReader, std::string sCommand, bool hasParameter, int parameter);
|
||||
|
||||
void ExecuteText(RtfDocument& oDocument, RtfReader& oReader, std::wstring sText);
|
||||
void GetData( BYTE** ppData, long& nSize);
|
||||
};
|
||||
|
||||
class RtfTrackerChangesReader: public RtfAbstractReader
|
||||
{
|
||||
private:
|
||||
|
||||
@ -300,26 +300,30 @@ public:
|
||||
|
||||
Ole1FormatReader(BYTE *pData, int Size)
|
||||
{
|
||||
NativeDataSize = 0;
|
||||
if (!pData || Size < 8) return;
|
||||
|
||||
CDataStream stream(pData, Size);
|
||||
|
||||
stream >> Header.OLEVersion >> Header.FormatID;
|
||||
|
||||
if (Header.OLEVersion & 0x00000500)
|
||||
if (Header.FormatID == 2)
|
||||
{
|
||||
stream >> Header.ClassName;
|
||||
}
|
||||
stream >> Header.Width >> Header.Height;
|
||||
|
||||
stream >> NativeDataSize;
|
||||
if (Header.OLEVersion & 0x00000500)
|
||||
{
|
||||
stream >> Header.ClassName;
|
||||
}
|
||||
stream >> Header.Width >> Header.Height;
|
||||
|
||||
NativeData = stream.GetCurPtr();
|
||||
stream.Skip(NativeDataSize);
|
||||
stream >> NativeDataSize;
|
||||
|
||||
NativeData = stream.GetCurPtr();
|
||||
stream.Skip(NativeDataSize);
|
||||
|
||||
int sz = stream.CanRead();
|
||||
int sz = stream.CanRead();
|
||||
|
||||
/// далее графическое представление
|
||||
/// далее графическое представление
|
||||
}
|
||||
|
||||
}
|
||||
ObjectHeader Header;
|
||||
|
||||
@ -93,10 +93,14 @@ std::wstring RtfOle::RenderToOOX(RenderParameter oRenderParameter)
|
||||
|
||||
RenderParameter oNewRenderParameter = oRenderParameter;
|
||||
oNewRenderParameter.nType = RENDER_TO_OOX_PARAM_SHAPE_WSHAPE2;
|
||||
m_oResultPic->m_bIsOle = true;
|
||||
sResult += m_oResultPic->RenderToOOX(oNewRenderParameter);
|
||||
|
||||
oNewRenderParameter.nValue = m_oResultPic->m_nID;
|
||||
if (m_oResultPic)
|
||||
{
|
||||
m_oResultPic->m_bIsOle = true;
|
||||
sResult += m_oResultPic->RenderToOOX(oNewRenderParameter);
|
||||
|
||||
oNewRenderParameter.nValue = m_oResultPic->m_nID;
|
||||
}
|
||||
sResult += RenderToOOXOnlyOle(oNewRenderParameter);
|
||||
|
||||
sResult += L"</w:object>";
|
||||
|
||||
@ -617,21 +617,6 @@ public:
|
||||
file.CloseFile();
|
||||
|
||||
}
|
||||
static void WriteDataToBinary( std::wstring sData, BYTE** ppData, long& nSize)
|
||||
{
|
||||
wchar_t * buf = (wchar_t *)sData.c_str();
|
||||
int nLengthText = (int)sData.length();
|
||||
nSize = nLengthText/2;
|
||||
BYTE * buf2 = new BYTE[ nSize];
|
||||
(*ppData) = buf2;
|
||||
BYTE nByte=0;
|
||||
for (long i=0; i < nSize ; i++ )
|
||||
{
|
||||
nByte = ToByte(buf[ 2*i])<<4;
|
||||
nByte |= ToByte(buf[ 2*i+1]);
|
||||
buf2[i] = nByte;
|
||||
}
|
||||
}
|
||||
static std::wstring DecodeHex( std::wstring sText )
|
||||
{
|
||||
std::wstring sHexText;
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
6967AFB71E2798B900A129E2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = OnlyOffce;
|
||||
TargetAttributes = {
|
||||
6967AFBE1E2798B900A129E2 = {
|
||||
@ -202,9 +202,7 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
@ -212,11 +210,7 @@
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@ -239,7 +233,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@ -255,9 +249,7 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
@ -265,11 +257,7 @@
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@ -286,7 +274,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
|
||||
@ -1,146 +1,143 @@
|
||||
// 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c
|
||||
// The original code and all modifications are in the public domain.
|
||||
|
||||
#include "pch.h"
|
||||
#include "3way.h"
|
||||
#include "misc.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
void ThreeWay_TestInstantiations()
|
||||
{
|
||||
ThreeWay::Encryption x1;
|
||||
ThreeWay::Decryption x2;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
const word32 START_E = 0x0b0b; // round constant of first encryption round
|
||||
const word32 START_D = 0xb1b1; // round constant of first decryption round
|
||||
#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
|
||||
const word32 RC_MODULUS = 0x11011;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline word32 reverseBits(word32 a)
|
||||
{
|
||||
a = ((a & 0xAAAAAAAA) >> 1) | ((a & 0x55555555) << 1);
|
||||
a = ((a & 0xCCCCCCCC) >> 2) | ((a & 0x33333333) << 2);
|
||||
return ((a & 0xF0F0F0F0) >> 4) | ((a & 0x0F0F0F0F) << 4);
|
||||
}
|
||||
|
||||
#define mu(a0, a1, a2) \
|
||||
{ \
|
||||
a1 = reverseBits(a1); \
|
||||
word32 t = reverseBits(a0); \
|
||||
a0 = reverseBits(a2); \
|
||||
a2 = t; \
|
||||
}
|
||||
|
||||
#define pi_gamma_pi(a0, a1, a2) \
|
||||
{ \
|
||||
word32 b0, b2; \
|
||||
b2 = rotlFixed(a2, 1U); \
|
||||
b0 = rotlFixed(a0, 22U); \
|
||||
a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \
|
||||
a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\
|
||||
a1 ^= (b2|(~b0)); \
|
||||
}
|
||||
|
||||
// thanks to Paulo Barreto for this optimized theta()
|
||||
#define theta(a0, a1, a2) \
|
||||
{ \
|
||||
word32 b0, b1, c; \
|
||||
c = a0 ^ a1 ^ a2; \
|
||||
c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \
|
||||
b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \
|
||||
b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \
|
||||
a0 ^= c ^ b0; \
|
||||
a1 ^= c ^ b1; \
|
||||
a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \
|
||||
}
|
||||
|
||||
#define rho(a0, a1, a2) \
|
||||
{ \
|
||||
theta(a0, a1, a2); \
|
||||
pi_gamma_pi(a0, a1, a2); \
|
||||
}
|
||||
|
||||
void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs ¶ms)
|
||||
{
|
||||
AssertValidKeyLength(length);
|
||||
|
||||
m_rounds = GetRoundsAndThrowIfInvalid(params, this);
|
||||
|
||||
for (unsigned int i=0; i<3; i++)
|
||||
m_k[i] = (word32)uk[4*i+3] | ((word32)uk[4*i+2]<<8) | ((word32)uk[4*i+1]<<16) | ((word32)uk[4*i]<<24);
|
||||
|
||||
if (!IsForwardTransformation())
|
||||
{
|
||||
theta(m_k[0], m_k[1], m_k[2]);
|
||||
mu(m_k[0], m_k[1], m_k[2]);
|
||||
m_k[0] = ByteReverse(m_k[0]);
|
||||
m_k[1] = ByteReverse(m_k[1]);
|
||||
m_k[2] = ByteReverse(m_k[2]);
|
||||
}
|
||||
}
|
||||
|
||||
void ThreeWay::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
typedef BlockGetAndPut<word32, BigEndian> Block;
|
||||
|
||||
word32 a0, a1, a2;
|
||||
Block::Get(inBlock)(a0)(a1)(a2);
|
||||
|
||||
word32 rc = START_E;
|
||||
|
||||
for(unsigned i=0; i<m_rounds; i++)
|
||||
{
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
rho(a0, a1, a2);
|
||||
|
||||
rc <<= 1;
|
||||
if (rc&0x10000) rc ^= 0x11011;
|
||||
}
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
theta(a0, a1, a2);
|
||||
|
||||
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
|
||||
}
|
||||
|
||||
void ThreeWay::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
typedef BlockGetAndPut<word32, LittleEndian> Block;
|
||||
|
||||
word32 a0, a1, a2;
|
||||
Block::Get(inBlock)(a0)(a1)(a2);
|
||||
|
||||
word32 rc = START_D;
|
||||
|
||||
mu(a0, a1, a2);
|
||||
for(unsigned i=0; i<m_rounds; i++)
|
||||
{
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
rho(a0, a1, a2);
|
||||
|
||||
rc <<= 1;
|
||||
if (rc&0x10000) rc ^= 0x11011;
|
||||
}
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
theta(a0, a1, a2);
|
||||
mu(a0, a1, a2);
|
||||
|
||||
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
|
||||
}
|
||||
|
||||
NAMESPACE_END
|
||||
// 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c
|
||||
// The original code and all modifications are in the public domain.
|
||||
|
||||
#include "pch.h"
|
||||
#include "3way.h"
|
||||
#include "misc.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if !defined(NDEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||
void ThreeWay_TestInstantiations()
|
||||
{
|
||||
ThreeWay::Encryption x1;
|
||||
ThreeWay::Decryption x2;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const word32 START_E = 0x0b0b; // round constant of first encryption round
|
||||
static const word32 START_D = 0xb1b1; // round constant of first decryption round
|
||||
#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
|
||||
static const word32 RC_MODULUS = 0x11011;
|
||||
#endif
|
||||
|
||||
static inline word32 reverseBits(word32 a)
|
||||
{
|
||||
a = ((a & 0xAAAAAAAA) >> 1) | ((a & 0x55555555) << 1);
|
||||
a = ((a & 0xCCCCCCCC) >> 2) | ((a & 0x33333333) << 2);
|
||||
return ((a & 0xF0F0F0F0) >> 4) | ((a & 0x0F0F0F0F) << 4);
|
||||
}
|
||||
|
||||
#define mu(a0, a1, a2) \
|
||||
{ \
|
||||
a1 = reverseBits(a1); \
|
||||
word32 t = reverseBits(a0); \
|
||||
a0 = reverseBits(a2); \
|
||||
a2 = t; \
|
||||
}
|
||||
|
||||
#define pi_gamma_pi(a0, a1, a2) \
|
||||
{ \
|
||||
word32 b0, b2; \
|
||||
b2 = rotlFixed(a2, 1U); \
|
||||
b0 = rotlFixed(a0, 22U); \
|
||||
a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \
|
||||
a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\
|
||||
a1 ^= (b2|(~b0)); \
|
||||
}
|
||||
|
||||
// thanks to Paulo Barreto for this optimized theta()
|
||||
#define theta(a0, a1, a2) \
|
||||
{ \
|
||||
word32 b0, b1, c; \
|
||||
c = a0 ^ a1 ^ a2; \
|
||||
c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \
|
||||
b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \
|
||||
b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \
|
||||
a0 ^= c ^ b0; \
|
||||
a1 ^= c ^ b1; \
|
||||
a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \
|
||||
}
|
||||
|
||||
#define rho(a0, a1, a2) \
|
||||
{ \
|
||||
theta(a0, a1, a2); \
|
||||
pi_gamma_pi(a0, a1, a2); \
|
||||
}
|
||||
|
||||
void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs ¶ms)
|
||||
{
|
||||
AssertValidKeyLength(length);
|
||||
|
||||
m_rounds = GetRoundsAndThrowIfInvalid(params, this);
|
||||
|
||||
for (unsigned int i=0; i<3; i++)
|
||||
m_k[i] = (word32)uk[4*i+3] | ((word32)uk[4*i+2]<<8) | ((word32)uk[4*i+1]<<16) | ((word32)uk[4*i]<<24);
|
||||
|
||||
if (!IsForwardTransformation())
|
||||
{
|
||||
theta(m_k[0], m_k[1], m_k[2]);
|
||||
mu(m_k[0], m_k[1], m_k[2]);
|
||||
m_k[0] = ByteReverse(m_k[0]);
|
||||
m_k[1] = ByteReverse(m_k[1]);
|
||||
m_k[2] = ByteReverse(m_k[2]);
|
||||
}
|
||||
}
|
||||
|
||||
void ThreeWay::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
typedef BlockGetAndPut<word32, BigEndian> Block;
|
||||
|
||||
word32 a0, a1, a2;
|
||||
Block::Get(inBlock)(a0)(a1)(a2);
|
||||
|
||||
word32 rc = START_E;
|
||||
|
||||
for(unsigned i=0; i<m_rounds; i++)
|
||||
{
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
rho(a0, a1, a2);
|
||||
|
||||
rc <<= 1;
|
||||
if (rc&0x10000) rc ^= 0x11011;
|
||||
}
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
theta(a0, a1, a2);
|
||||
|
||||
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
|
||||
}
|
||||
|
||||
void ThreeWay::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
typedef BlockGetAndPut<word32, LittleEndian> Block;
|
||||
|
||||
word32 a0, a1, a2;
|
||||
Block::Get(inBlock)(a0)(a1)(a2);
|
||||
|
||||
word32 rc = START_D;
|
||||
|
||||
mu(a0, a1, a2);
|
||||
for(unsigned i=0; i<m_rounds; i++)
|
||||
{
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
rho(a0, a1, a2);
|
||||
|
||||
rc <<= 1;
|
||||
if (rc&0x10000) rc ^= 0x11011;
|
||||
}
|
||||
a0 ^= m_k[0] ^ (rc<<16);
|
||||
a1 ^= m_k[1];
|
||||
a2 ^= m_k[2] ^ rc;
|
||||
theta(a0, a1, a2);
|
||||
mu(a0, a1, a2);
|
||||
|
||||
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
|
||||
}
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
@ -1,68 +1,69 @@
|
||||
// 3way.h - written and placed in the public domain by Wei Dai
|
||||
|
||||
//! \file 3way.h
|
||||
//! \brief Classes for the 3-Way block cipher
|
||||
|
||||
#ifndef CRYPTOPP_THREEWAY_H
|
||||
#define CRYPTOPP_THREEWAY_H
|
||||
|
||||
#include "config.h"
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! \class ThreeWay_Info
|
||||
//! \brief ThreeWay block cipher information
|
||||
struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
|
||||
{
|
||||
CRYPTOPP_CONSTEXPR static const char *StaticAlgorithmName() {return "3-Way";}
|
||||
};
|
||||
|
||||
//! \class ThreeWay
|
||||
//! \brief ThreeWay block cipher
|
||||
//! \sa <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
|
||||
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
|
||||
{
|
||||
//! \class Base
|
||||
//! \brief Class specific implementation and overrides used to operate the cipher.
|
||||
//! \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
|
||||
|
||||
protected:
|
||||
unsigned int m_rounds;
|
||||
FixedSizeSecBlock<word32, 3> m_k;
|
||||
};
|
||||
|
||||
//! \class Enc
|
||||
//! \brief Class specific methods used to operate the cipher in the forward direction.
|
||||
//! \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
|
||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
//! \class Dec
|
||||
//! \brief Class specific methods used to operate the cipher in the reverse direction.
|
||||
//! \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
|
||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
|
||||
};
|
||||
|
||||
typedef ThreeWay::Encryption ThreeWayEncryption;
|
||||
typedef ThreeWay::Decryption ThreeWayDecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
// 3way.h - written and placed in the public domain by Wei Dai
|
||||
|
||||
//! \file 3way.h
|
||||
//! \brief Classes for the 3-Way block cipher
|
||||
|
||||
#ifndef CRYPTOPP_THREEWAY_H
|
||||
#define CRYPTOPP_THREEWAY_H
|
||||
|
||||
#include "config.h"
|
||||
#include "seckey.h"
|
||||
#include "secblock.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! \class ThreeWay_Info
|
||||
//! \brief The cipher's key, iv, block size and name information.
|
||||
struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
|
||||
{
|
||||
static const char *StaticAlgorithmName() {return "3-Way";}
|
||||
};
|
||||
|
||||
// <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
|
||||
|
||||
//! \class ThreeWay
|
||||
//! \brief Provides 3-Way encryption and decryption
|
||||
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
|
||||
{
|
||||
//! \class Base
|
||||
//! \brief Class specific implementation and overrides used to operate the cipher.
|
||||
//! \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
|
||||
{
|
||||
public:
|
||||
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms);
|
||||
|
||||
protected:
|
||||
unsigned int m_rounds;
|
||||
FixedSizeSecBlock<word32, 3> m_k;
|
||||
};
|
||||
|
||||
//! \class Enc
|
||||
//! \brief Class specific methods used to operate the cipher in the forward direction.
|
||||
//! \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
|
||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
//! \class Dec
|
||||
//! \brief Class specific methods used to operate the cipher in the reverse direction.
|
||||
//! \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
|
||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||
{
|
||||
public:
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
|
||||
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
|
||||
};
|
||||
|
||||
typedef ThreeWay::Encryption ThreeWayEncryption;
|
||||
typedef ThreeWay::Decryption ThreeWayDecryption;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,420 +1,393 @@
|
||||
3way.cpp
|
||||
3way.h
|
||||
adhoc.cpp.proto
|
||||
adler32.cpp
|
||||
adler32.h
|
||||
aes.h
|
||||
algebra.cpp
|
||||
algebra.h
|
||||
algparam.cpp
|
||||
algparam.h
|
||||
arc4.cpp
|
||||
arc4.h
|
||||
argnames.h
|
||||
asn.cpp
|
||||
asn.h
|
||||
authenc.cpp
|
||||
authenc.h
|
||||
base32.cpp
|
||||
base32.h
|
||||
base64.cpp
|
||||
base64.h
|
||||
basecode.cpp
|
||||
basecode.h
|
||||
bench.h
|
||||
bds10.zip
|
||||
bench1.cpp
|
||||
bench2.cpp
|
||||
bfinit.cpp
|
||||
blake2.cpp
|
||||
blake2.h
|
||||
blowfish.cpp
|
||||
blowfish.h
|
||||
blumshub.cpp
|
||||
blumshub.h
|
||||
camellia.cpp
|
||||
camellia.h
|
||||
cast.cpp
|
||||
cast.h
|
||||
casts.cpp
|
||||
cbcmac.cpp
|
||||
cbcmac.h
|
||||
ccm.cpp
|
||||
ccm.h
|
||||
chacha.cpp
|
||||
chacha.h
|
||||
channels.cpp
|
||||
channels.h
|
||||
cmac.cpp
|
||||
cmac.h
|
||||
config.h
|
||||
config.compat
|
||||
cpu.cpp
|
||||
cpu.h
|
||||
crc.cpp
|
||||
crc.h
|
||||
cryptdll.vcxproj
|
||||
cryptdll.vcxproj.filters
|
||||
cryptest.sh
|
||||
cryptest.sln
|
||||
cryptest.vcxproj
|
||||
cryptest.vcxproj.user
|
||||
cryptest.vcxproj.filters
|
||||
cryptest.nmake
|
||||
cryptlib.cpp
|
||||
cryptlib.h
|
||||
cryptlib.vcxproj
|
||||
cryptlib.vcxproj.filters
|
||||
cryptopp.rc
|
||||
datatest.cpp
|
||||
default.cpp
|
||||
default.h
|
||||
des.cpp
|
||||
des.h
|
||||
dessp.cpp
|
||||
dh.cpp
|
||||
dh.h
|
||||
dh2.cpp
|
||||
dh2.h
|
||||
dll.cpp
|
||||
dll.h
|
||||
dlltest.cpp
|
||||
dlltest.vcxproj
|
||||
dlltest.vcxproj.filters
|
||||
dmac.h
|
||||
dsa.cpp
|
||||
dsa.h
|
||||
eax.cpp
|
||||
eax.h
|
||||
ec2n.cpp
|
||||
ec2n.h
|
||||
eccrypto.cpp
|
||||
eccrypto.h
|
||||
ecp.cpp
|
||||
ecp.h
|
||||
elgamal.cpp
|
||||
elgamal.h
|
||||
emsa2.cpp
|
||||
emsa2.h
|
||||
eprecomp.cpp
|
||||
eprecomp.h
|
||||
esign.cpp
|
||||
esign.h
|
||||
factory.h
|
||||
fhmqv.cpp
|
||||
fhmqv.h
|
||||
files.cpp
|
||||
files.h
|
||||
filters.cpp
|
||||
filters.h
|
||||
fips140.cpp
|
||||
fips140.h
|
||||
fipsalgt.cpp
|
||||
fipstest.cpp
|
||||
fltrimpl.h
|
||||
gcm.cpp
|
||||
gcm.h
|
||||
gf256.cpp
|
||||
gf256.h
|
||||
gf2_32.cpp
|
||||
gf2_32.h
|
||||
gf2n.cpp
|
||||
gf2n.h
|
||||
gfpcrypt.cpp
|
||||
gfpcrypt.h
|
||||
gost.cpp
|
||||
gost.h
|
||||
gzip.cpp
|
||||
gzip.h
|
||||
hex.cpp
|
||||
hex.h
|
||||
hkdf.h
|
||||
hmac.cpp
|
||||
hmac.h
|
||||
hmqv.cpp
|
||||
hmqv.h
|
||||
hrtimer.cpp
|
||||
hrtimer.h
|
||||
ida.cpp
|
||||
ida.h
|
||||
idea.cpp
|
||||
idea.h
|
||||
integer.cpp
|
||||
integer.h
|
||||
iterhash.cpp
|
||||
iterhash.h
|
||||
keccak.cpp
|
||||
keccak.h
|
||||
lubyrack.h
|
||||
luc.cpp
|
||||
luc.h
|
||||
mars.cpp
|
||||
mars.h
|
||||
marss.cpp
|
||||
md2.cpp
|
||||
md2.h
|
||||
md4.cpp
|
||||
md4.h
|
||||
md5.cpp
|
||||
md5.h
|
||||
mdc.h
|
||||
mersenne.h
|
||||
misc.cpp
|
||||
misc.h
|
||||
modarith.h
|
||||
modes.cpp
|
||||
modes.h
|
||||
modexppc.h
|
||||
mqueue.cpp
|
||||
mqueue.h
|
||||
mqv.cpp
|
||||
mqv.h
|
||||
nbtheory.cpp
|
||||
nbtheory.h
|
||||
network.cpp
|
||||
network.h
|
||||
nr.h
|
||||
oaep.cpp
|
||||
oaep.h
|
||||
oids.h
|
||||
osrng.cpp
|
||||
osrng.h
|
||||
ossig.h
|
||||
panama.cpp
|
||||
panama.h
|
||||
pch.cpp
|
||||
pch.h
|
||||
pkcspad.cpp
|
||||
pkcspad.h
|
||||
polynomi.cpp
|
||||
polynomi.h
|
||||
pssr.cpp
|
||||
pssr.h
|
||||
pubkey.cpp
|
||||
pubkey.h
|
||||
pwdbased.h
|
||||
queue.cpp
|
||||
queue.h
|
||||
rabin.cpp
|
||||
rabin.h
|
||||
randpool.cpp
|
||||
randpool.h
|
||||
rc2.cpp
|
||||
rc2.h
|
||||
rc5.cpp
|
||||
rc5.h
|
||||
rc6.cpp
|
||||
rc6.h
|
||||
rdrand-masm.cmd
|
||||
rdrand-nasm.sh
|
||||
rdrand.S
|
||||
rdrand.asm
|
||||
rdrand.cpp
|
||||
rdrand.h
|
||||
rdtables.cpp
|
||||
regtest.cpp
|
||||
resource.h
|
||||
rijndael.cpp
|
||||
rijndael.h
|
||||
ripemd.cpp
|
||||
ripemd.h
|
||||
rng.cpp
|
||||
rng.h
|
||||
rsa.cpp
|
||||
rsa.h
|
||||
rw.cpp
|
||||
rw.h
|
||||
safer.cpp
|
||||
safer.h
|
||||
salsa.cpp
|
||||
salsa.h
|
||||
seal.cpp
|
||||
seal.h
|
||||
secblock.h
|
||||
seckey.h
|
||||
seed.cpp
|
||||
seed.h
|
||||
serpent.cpp
|
||||
serpent.h
|
||||
serpentp.h
|
||||
sha.cpp
|
||||
sha.h
|
||||
sha3.cpp
|
||||
sha3.h
|
||||
shacal2.cpp
|
||||
shacal2.h
|
||||
shark.cpp
|
||||
shark.h
|
||||
sharkbox.cpp
|
||||
simple.cpp
|
||||
simple.h
|
||||
skipjack.cpp
|
||||
skipjack.h
|
||||
smartptr.h
|
||||
socketft.cpp
|
||||
socketft.h
|
||||
sosemanuk.cpp
|
||||
sosemanuk.h
|
||||
square.cpp
|
||||
square.h
|
||||
squaretb.cpp
|
||||
stdcpp.h
|
||||
strciphr.cpp
|
||||
strciphr.h
|
||||
tea.cpp
|
||||
tea.h
|
||||
test.cpp
|
||||
trap.h
|
||||
tftables.cpp
|
||||
tiger.cpp
|
||||
tiger.h
|
||||
tigertab.cpp
|
||||
trdlocal.cpp
|
||||
trdlocal.h
|
||||
trunhash.h
|
||||
ttmac.cpp
|
||||
ttmac.h
|
||||
twofish.cpp
|
||||
twofish.h
|
||||
validat1.cpp
|
||||
validat2.cpp
|
||||
validat3.cpp
|
||||
validate.h
|
||||
vmac.cpp
|
||||
vmac.h
|
||||
vc60.zip
|
||||
vs2005.zip
|
||||
wait.cpp
|
||||
wait.h
|
||||
wake.cpp
|
||||
wake.h
|
||||
whrlpool.cpp
|
||||
whrlpool.h
|
||||
winpipes.cpp
|
||||
winpipes.h
|
||||
words.h
|
||||
x64dll.asm
|
||||
x64masm.asm
|
||||
xtr.cpp
|
||||
xtr.h
|
||||
xtrcrypt.cpp
|
||||
xtrcrypt.h
|
||||
zdeflate.cpp
|
||||
zdeflate.h
|
||||
zinflate.cpp
|
||||
zinflate.h
|
||||
zlib.cpp
|
||||
zlib.h
|
||||
Doxyfile
|
||||
GNUmakefile
|
||||
GNUmakefile-cross
|
||||
License.txt
|
||||
Readme.txt
|
||||
Install.txt
|
||||
Filelist.txt
|
||||
TestData/3desval.dat
|
||||
TestData/3wayval.dat
|
||||
TestData/camellia.dat
|
||||
TestData/cast128v.dat
|
||||
TestData/cast256v.dat
|
||||
TestData/descert.dat
|
||||
TestData/dh1024.dat
|
||||
TestData/dh2048.dat
|
||||
TestData/dlie1024.dat
|
||||
TestData/dlie2048.dat
|
||||
TestData/dsa1024.dat
|
||||
TestData/dsa1024b.dat
|
||||
TestData/dsa512.dat
|
||||
TestData/elgc1024.dat
|
||||
TestData/esig1023.dat
|
||||
TestData/esig1536.dat
|
||||
TestData/esig2046.dat
|
||||
TestData/fhmqv160.dat
|
||||
TestData/fhmqv256.dat
|
||||
TestData/fhmqv384.dat
|
||||
TestData/fhmqv512.dat
|
||||
TestData/gostval.dat
|
||||
TestData/hmqv160.dat
|
||||
TestData/hmqv256.dat
|
||||
TestData/hmqv384.dat
|
||||
TestData/hmqv512.dat
|
||||
TestData/ideaval.dat
|
||||
TestData/luc1024.dat
|
||||
TestData/luc2048.dat
|
||||
TestData/lucc1024.dat
|
||||
TestData/lucc512.dat
|
||||
TestData/lucd1024.dat
|
||||
TestData/lucd512.dat
|
||||
TestData/lucs1024.dat
|
||||
TestData/lucs512.dat
|
||||
TestData/marsval.dat
|
||||
TestData/mqv1024.dat
|
||||
TestData/mqv2048.dat
|
||||
TestData/nr1024.dat
|
||||
TestData/nr2048.dat
|
||||
TestData/rabi1024.dat
|
||||
TestData/rabi2048.dat
|
||||
TestData/rc2val.dat
|
||||
TestData/rc5val.dat
|
||||
TestData/rc6val.dat
|
||||
TestData/rijndael.dat
|
||||
TestData/rsa1024.dat
|
||||
TestData/rsa2048.dat
|
||||
TestData/rsa400pb.dat
|
||||
TestData/rsa400pv.dat
|
||||
TestData/rsa512a.dat
|
||||
TestData/rw1024.dat
|
||||
TestData/rw2048.dat
|
||||
TestData/saferval.dat
|
||||
TestData/serpentv.dat
|
||||
TestData/shacal2v.dat
|
||||
TestData/sharkval.dat
|
||||
TestData/skipjack.dat
|
||||
TestData/squareva.dat
|
||||
TestData/twofishv.dat
|
||||
TestData/usage.dat
|
||||
TestData/xtrdh171.dat
|
||||
TestData/xtrdh342.dat
|
||||
TestVectors/Readme.txt
|
||||
TestVectors/aes.txt
|
||||
TestVectors/all.txt
|
||||
TestVectors/blake2.txt
|
||||
TestVectors/blake2b.txt
|
||||
TestVectors/blake2s.txt
|
||||
TestVectors/camellia.txt
|
||||
TestVectors/ccm.txt
|
||||
TestVectors/chacha.txt
|
||||
TestVectors/cmac.txt
|
||||
TestVectors/dlies.txt
|
||||
TestVectors/dsa.txt
|
||||
TestVectors/dsa_1363.txt
|
||||
TestVectors/eax.txt
|
||||
TestVectors/esign.txt
|
||||
TestVectors/gcm.txt
|
||||
TestVectors/hkdf.txt
|
||||
TestVectors/hmac.txt
|
||||
TestVectors/keccak.txt
|
||||
TestVectors/mars.txt
|
||||
TestVectors/nr.txt
|
||||
TestVectors/panama.txt
|
||||
TestVectors/rsa_oaep.txt
|
||||
TestVectors/rsa_pkcs1_1_5.txt
|
||||
TestVectors/rsa_pss.txt
|
||||
TestVectors/dsa_rfc6979.txt
|
||||
TestVectors/rw.txt
|
||||
TestVectors/salsa.txt
|
||||
TestVectors/seal.txt
|
||||
TestVectors/seed.txt
|
||||
TestVectors/sha.txt
|
||||
TestVectors/sha3_fips_202.txt
|
||||
TestVectors/sha3_224_fips_202.txt
|
||||
TestVectors/sha3_256_fips_202.txt
|
||||
TestVectors/sha3_384_fips_202.txt
|
||||
TestVectors/sha3_512_fips_202.txt
|
||||
TestVectors/shacal2.txt
|
||||
TestVectors/sosemanuk.txt
|
||||
TestVectors/tea.txt
|
||||
TestVectors/ttmac.txt
|
||||
TestVectors/vmac.txt
|
||||
TestVectors/wake.txt
|
||||
TestVectors/whrlpool.txt
|
||||
3way.cpp
|
||||
3way.h
|
||||
adhoc.cpp.proto
|
||||
adler32.cpp
|
||||
adler32.h
|
||||
aes.h
|
||||
algebra.cpp
|
||||
algebra.h
|
||||
algparam.cpp
|
||||
algparam.h
|
||||
arc4.cpp
|
||||
arc4.h
|
||||
argnames.h
|
||||
asn.cpp
|
||||
asn.h
|
||||
authenc.cpp
|
||||
authenc.h
|
||||
base32.cpp
|
||||
base32.h
|
||||
base64.cpp
|
||||
base64.h
|
||||
basecode.cpp
|
||||
basecode.h
|
||||
bench.cpp
|
||||
bench.h
|
||||
bench2.cpp
|
||||
bfinit.cpp
|
||||
blowfish.cpp
|
||||
blowfish.h
|
||||
blumshub.cpp
|
||||
blumshub.h
|
||||
camellia.cpp
|
||||
camellia.h
|
||||
cast.cpp
|
||||
cast.h
|
||||
casts.cpp
|
||||
cbcmac.cpp
|
||||
cbcmac.h
|
||||
ccm.cpp
|
||||
ccm.h
|
||||
channels.cpp
|
||||
channels.h
|
||||
cmac.cpp
|
||||
cmac.h
|
||||
config.h
|
||||
config.recommend
|
||||
cpu.cpp
|
||||
cpu.h
|
||||
crc.cpp
|
||||
crc.h
|
||||
cryptdll.dsp
|
||||
cryptdll.vcproj
|
||||
cryptest.dsp
|
||||
cryptest.dsw
|
||||
cryptest.sh
|
||||
cryptest.sln
|
||||
cryptest.vcproj
|
||||
cryptest_bds.bdsgroup
|
||||
cryptest_bds.bdsproj
|
||||
cryptest_bds.bpf
|
||||
cryptlib.cpp
|
||||
cryptlib.dsp
|
||||
cryptlib.h
|
||||
cryptlib.vcproj
|
||||
cryptlib_bds.bdsproj
|
||||
cryptlib_bds.cpp
|
||||
cryptopp.rc
|
||||
cryptopp563.diff
|
||||
datatest.cpp
|
||||
default.cpp
|
||||
default.h
|
||||
des.cpp
|
||||
des.h
|
||||
dessp.cpp
|
||||
dh.cpp
|
||||
dh.h
|
||||
dh2.cpp
|
||||
dh2.h
|
||||
dll.cpp
|
||||
dll.h
|
||||
dlltest.cpp
|
||||
dlltest.dsp
|
||||
dlltest.vcproj
|
||||
dmac.h
|
||||
dsa.cpp
|
||||
dsa.h
|
||||
eax.cpp
|
||||
eax.h
|
||||
ec2n.cpp
|
||||
ec2n.h
|
||||
eccrypto.cpp
|
||||
eccrypto.h
|
||||
ecp.cpp
|
||||
ecp.h
|
||||
elgamal.cpp
|
||||
elgamal.h
|
||||
emsa2.cpp
|
||||
emsa2.h
|
||||
eprecomp.cpp
|
||||
eprecomp.h
|
||||
esign.cpp
|
||||
esign.h
|
||||
factory.h
|
||||
files.cpp
|
||||
files.h
|
||||
filters.cpp
|
||||
filters.h
|
||||
fips140.cpp
|
||||
fips140.h
|
||||
fipsalgt.cpp
|
||||
fipstest.cpp
|
||||
fltrimpl.h
|
||||
gcm.cpp
|
||||
gcm.h
|
||||
gf256.cpp
|
||||
gf256.h
|
||||
gf2_32.cpp
|
||||
gf2_32.h
|
||||
gf2n.cpp
|
||||
gf2n.h
|
||||
gfpcrypt.cpp
|
||||
gfpcrypt.h
|
||||
gost.cpp
|
||||
gost.h
|
||||
gzip.cpp
|
||||
gzip.h
|
||||
hex.cpp
|
||||
hex.h
|
||||
hkdf.h
|
||||
hmac.cpp
|
||||
hmac.h
|
||||
hrtimer.cpp
|
||||
hrtimer.h
|
||||
ida.cpp
|
||||
ida.h
|
||||
idea.cpp
|
||||
idea.h
|
||||
integer.cpp
|
||||
integer.h
|
||||
iterhash.cpp
|
||||
iterhash.h
|
||||
lubyrack.h
|
||||
luc.cpp
|
||||
luc.h
|
||||
mars.cpp
|
||||
mars.h
|
||||
marss.cpp
|
||||
md2.cpp
|
||||
md2.h
|
||||
md4.cpp
|
||||
md4.h
|
||||
md5.cpp
|
||||
md5.h
|
||||
mdc.h
|
||||
mersenne.h
|
||||
misc.cpp
|
||||
misc.h
|
||||
modarith.h
|
||||
modes.cpp
|
||||
modes.h
|
||||
modexppc.h
|
||||
mqueue.cpp
|
||||
mqueue.h
|
||||
mqv.cpp
|
||||
mqv.h
|
||||
nbtheory.cpp
|
||||
nbtheory.h
|
||||
network.cpp
|
||||
network.h
|
||||
nr.h
|
||||
oaep.cpp
|
||||
oaep.h
|
||||
oids.h
|
||||
osrng.cpp
|
||||
osrng.h
|
||||
panama.cpp
|
||||
panama.h
|
||||
pch.cpp
|
||||
pch.h
|
||||
pkcspad.cpp
|
||||
pkcspad.h
|
||||
polynomi.cpp
|
||||
polynomi.h
|
||||
pssr.cpp
|
||||
pssr.h
|
||||
pubkey.cpp
|
||||
pubkey.h
|
||||
pwdbased.h
|
||||
queue.cpp
|
||||
queue.h
|
||||
rabin.cpp
|
||||
rabin.h
|
||||
randpool.cpp
|
||||
randpool.h
|
||||
rc2.cpp
|
||||
rc2.h
|
||||
rc5.cpp
|
||||
rc5.h
|
||||
rc6.cpp
|
||||
rc6.h
|
||||
rdrand-masm.cmd
|
||||
rdrand-nasm.sh
|
||||
rdrand.S
|
||||
rdrand.asm
|
||||
rdrand.cpp
|
||||
rdrand.h
|
||||
rdtables.cpp
|
||||
regtest.cpp
|
||||
resource.h
|
||||
rijndael.cpp
|
||||
rijndael.h
|
||||
ripemd.cpp
|
||||
ripemd.h
|
||||
rng.cpp
|
||||
rng.h
|
||||
rsa.cpp
|
||||
rsa.h
|
||||
rw.cpp
|
||||
rw.h
|
||||
safer.cpp
|
||||
safer.h
|
||||
salsa.cpp
|
||||
salsa.h
|
||||
seal.cpp
|
||||
seal.h
|
||||
secblock.h
|
||||
seckey.h
|
||||
seed.cpp
|
||||
seed.h
|
||||
serpent.cpp
|
||||
serpent.h
|
||||
serpentp.h
|
||||
sha.cpp
|
||||
sha.h
|
||||
sha3.cpp
|
||||
sha3.h
|
||||
shacal2.cpp
|
||||
shacal2.h
|
||||
shark.cpp
|
||||
shark.h
|
||||
sharkbox.cpp
|
||||
simple.cpp
|
||||
simple.h
|
||||
skipjack.cpp
|
||||
skipjack.h
|
||||
smartptr.h
|
||||
socketft.cpp
|
||||
socketft.h
|
||||
sosemanuk.cpp
|
||||
sosemanuk.h
|
||||
square.cpp
|
||||
square.h
|
||||
squaretb.cpp
|
||||
stdcpp.h
|
||||
strciphr.cpp
|
||||
strciphr.h
|
||||
tea.cpp
|
||||
tea.h
|
||||
test.cpp
|
||||
tftables.cpp
|
||||
tiger.cpp
|
||||
tiger.h
|
||||
tigertab.cpp
|
||||
trdlocal.cpp
|
||||
trdlocal.h
|
||||
trunhash.h
|
||||
ttmac.cpp
|
||||
ttmac.h
|
||||
twofish.cpp
|
||||
twofish.h
|
||||
validat1.cpp
|
||||
validat2.cpp
|
||||
validat3.cpp
|
||||
validate.h
|
||||
vmac.cpp
|
||||
vmac.h
|
||||
vs2010.zip
|
||||
wait.cpp
|
||||
wait.h
|
||||
wake.cpp
|
||||
wake.h
|
||||
whrlpool.cpp
|
||||
whrlpool.h
|
||||
winpipes.cpp
|
||||
winpipes.h
|
||||
words.h
|
||||
x64dll.asm
|
||||
x64masm.asm
|
||||
xtr.cpp
|
||||
xtr.h
|
||||
xtrcrypt.cpp
|
||||
xtrcrypt.h
|
||||
zdeflate.cpp
|
||||
zdeflate.h
|
||||
zinflate.cpp
|
||||
zinflate.h
|
||||
zlib.cpp
|
||||
zlib.h
|
||||
Doxyfile
|
||||
GNUmakefile
|
||||
GNUmakefile-cross
|
||||
License.txt
|
||||
Readme.txt
|
||||
Install.txt
|
||||
Filelist.txt
|
||||
TestData/3desval.dat
|
||||
TestData/3wayval.dat
|
||||
TestData/camellia.dat
|
||||
TestData/cast128v.dat
|
||||
TestData/cast256v.dat
|
||||
TestData/descert.dat
|
||||
TestData/dh1024.dat
|
||||
TestData/dh2048.dat
|
||||
TestData/dlie1024.dat
|
||||
TestData/dlie2048.dat
|
||||
TestData/dsa1024.dat
|
||||
TestData/dsa1024b.dat
|
||||
TestData/dsa512.dat
|
||||
TestData/elgc1024.dat
|
||||
TestData/esig1023.dat
|
||||
TestData/esig1536.dat
|
||||
TestData/esig2046.dat
|
||||
TestData/gostval.dat
|
||||
TestData/ideaval.dat
|
||||
TestData/luc1024.dat
|
||||
TestData/luc2048.dat
|
||||
TestData/lucc1024.dat
|
||||
TestData/lucc512.dat
|
||||
TestData/lucd1024.dat
|
||||
TestData/lucd512.dat
|
||||
TestData/lucs1024.dat
|
||||
TestData/lucs512.dat
|
||||
TestData/marsval.dat
|
||||
TestData/mqv1024.dat
|
||||
TestData/mqv2048.dat
|
||||
TestData/nr1024.dat
|
||||
TestData/nr2048.dat
|
||||
TestData/rabi1024.dat
|
||||
TestData/rabi2048.dat
|
||||
TestData/rc2val.dat
|
||||
TestData/rc5val.dat
|
||||
TestData/rc6val.dat
|
||||
TestData/rijndael.dat
|
||||
TestData/rsa1024.dat
|
||||
TestData/rsa2048.dat
|
||||
TestData/rsa400pb.dat
|
||||
TestData/rsa400pv.dat
|
||||
TestData/rsa512a.dat
|
||||
TestData/rw1024.dat
|
||||
TestData/rw2048.dat
|
||||
TestData/saferval.dat
|
||||
TestData/serpentv.dat
|
||||
TestData/shacal2v.dat
|
||||
TestData/sharkval.dat
|
||||
TestData/skipjack.dat
|
||||
TestData/squareva.dat
|
||||
TestData/twofishv.dat
|
||||
TestData/usage.dat
|
||||
TestData/xtrdh171.dat
|
||||
TestData/xtrdh342.dat
|
||||
TestVectors/Readme.txt
|
||||
TestVectors/aes.txt
|
||||
TestVectors/all.txt
|
||||
TestVectors/camellia.txt
|
||||
TestVectors/ccm.txt
|
||||
TestVectors/cmac.txt
|
||||
TestVectors/dlies.txt
|
||||
TestVectors/dsa.txt
|
||||
TestVectors/dsa_1363.txt
|
||||
TestVectors/eax.txt
|
||||
TestVectors/esign.txt
|
||||
TestVectors/gcm.txt
|
||||
TestVectors/hkdf.txt
|
||||
TestVectors/hmac.txt
|
||||
TestVectors/mars.txt
|
||||
TestVectors/nr.txt
|
||||
TestVectors/panama.txt
|
||||
TestVectors/rsa_oaep.txt
|
||||
TestVectors/rsa_pkcs1_1_5.txt
|
||||
TestVectors/rsa_pss.txt
|
||||
TestVectors/rw.txt
|
||||
TestVectors/salsa.txt
|
||||
TestVectors/seal.txt
|
||||
TestVectors/seed.txt
|
||||
TestVectors/sha.txt
|
||||
TestVectors/sha3.txt
|
||||
TestVectors/shacal2.txt
|
||||
TestVectors/sosemanuk.txt
|
||||
TestVectors/tea.txt
|
||||
TestVectors/ttmac.txt
|
||||
TestVectors/vmac.txt
|
||||
TestVectors/wake.txt
|
||||
TestVectors/whrlpool.txt
|
||||
|
||||
659
Common/3dParty/cryptopp/GNUmakefile
Executable file → Normal file
659
Common/3dParty/cryptopp/GNUmakefile
Executable file → Normal file
@ -1,162 +1,104 @@
|
||||
###########################################################
|
||||
##### System Attributes and Programs #####
|
||||
###########################################################
|
||||
# Base CXXFLAGS used if the user did not specify them
|
||||
CXXFLAGS ?= -DNDEBUG -g2 -O2
|
||||
|
||||
# -fPIC is supported, please report failures with steps to reproduce
|
||||
# If PIC is required but results in a crash, then use -DCRYPTOPP_DISABLE_ASM
|
||||
# CXXFLAGS += -fPIC
|
||||
|
||||
# Add the following options reduce code size, but breaks link
|
||||
# or makes link very slow on some systems
|
||||
# CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
# On OS X, you need to use "LDFLAGS += -Wl,-dead_strip"
|
||||
# LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
AR ?= ar
|
||||
ARFLAGS ?= -cr # ar needs the dash on OpenBSD
|
||||
ARFLAGS ?= -cr # ar needs the dash on OpenBSD
|
||||
RANLIB ?= ranlib
|
||||
|
||||
CP ?= cp
|
||||
MV ?= mv
|
||||
EGREP ?= egrep
|
||||
CHMOD ?= chmod
|
||||
MKDIR ?= mkdir
|
||||
LN ?= ln -sf
|
||||
LDCONF ?= /sbin/ldconfig -n
|
||||
UNAME := $(shell uname)
|
||||
EGREP ?= egrep
|
||||
|
||||
IS_X86 := $(shell uname -m | $(EGREP) -v "x86_64" | $(EGREP) -i -c "i.86|x86|i86")
|
||||
IS_X32 ?= 0
|
||||
IS_X64 := $(shell uname -m | $(EGREP) -i -c "(_64|d64)")
|
||||
IS_PPC := $(shell uname -m | $(EGREP) -i -c "ppc|power")
|
||||
IS_ARM32 := $(shell uname -m | $(EGREP) -i -c "arm")
|
||||
IS_ARM64 := $(shell uname -m | $(EGREP) -i -c "aarch64")
|
||||
UNAME := $(shell uname)
|
||||
IS_X86 := $(shell uname -m | $(EGREP) -i -c "i.86|x86|i86|amd64")
|
||||
IS_X86_64 := $(shell uname -m | $(EGREP) -i -c "(_64|d64)")
|
||||
IS_AARCH64 := $(shell uname -m | $(EGREP) -i -c "aarch64")
|
||||
|
||||
IS_SUN := $(shell uname | $(EGREP) -i -c "SunOS")
|
||||
IS_LINUX := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "Linux")
|
||||
IS_MINGW := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "MinGW")
|
||||
IS_CYGWIN := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "Cygwin")
|
||||
IS_DARWIN := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "Darwin")
|
||||
IS_NETBSD := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "NetBSD")
|
||||
|
||||
SUN_COMPILER := $(shell $(CXX) -V 2>&1 | $(EGREP) -i -c "CC: (Sun|Studio)")
|
||||
GCC_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -v "clang" | $(EGREP) -i -c "(gcc|g\+\+)")
|
||||
SUN_COMPILER := $(shell $(CXX) -V 2>&1 | $(EGREP) -i -c "CC: Sun")
|
||||
GCC_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "(gcc|g\+\+)")
|
||||
CLANG_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
|
||||
INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "\(icc\)")
|
||||
INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)")
|
||||
MACPORTS_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "macports")
|
||||
|
||||
# Sun Studio 12.0 provides SunCC 0x0510; and Sun Studio 12.3 provides SunCC 0x0512
|
||||
SUNCC_510_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[0-9]|5\.[2-9]|6\.)")
|
||||
SUNCC_511_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[1-9]|5\.[2-9]|6\.)")
|
||||
SUNCC_512_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[2-9]|5\.[2-9]|6\.)")
|
||||
SUNCC_513_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[3-9]|5\.[2-9]|6\.)")
|
||||
|
||||
HAS_SOLIB_VERSION := $(IS_LINUX)
|
||||
|
||||
# Fixup SunOS
|
||||
ifeq ($(IS_SUN),1)
|
||||
IS_X86 := $(shell isainfo -k 2>/dev/null | grep -i -c "i386")
|
||||
IS_X64 := $(shell isainfo -k 2>/dev/null | grep -i -c "amd64")
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
##### General Variables #####
|
||||
###########################################################
|
||||
|
||||
# Base CXXFLAGS used if the user did not specify them
|
||||
ifeq ($(SUN_COMPILER),1)
|
||||
ifeq ($(SUNCC_512_OR_LATER),1)
|
||||
CXXFLAGS ?= -DNDEBUG -g3 -xO2
|
||||
else
|
||||
CXXFLAGS ?= -DNDEBUG -g -xO2
|
||||
endif
|
||||
else
|
||||
CXXFLAGS ?= -DNDEBUG -g2 -O2
|
||||
endif
|
||||
|
||||
# Default prefix for make install
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX = /usr/local
|
||||
PREFIX = /usr
|
||||
endif
|
||||
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
ifeq ($(DATADIR),)
|
||||
DATADIR := $(PREFIX)/share
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(BINDIR),)
|
||||
BINDIR := $(PREFIX)/bin
|
||||
endif
|
||||
ifeq ($(INCLUDEDIR),)
|
||||
INCLUDEDIR := $(PREFIX)/include
|
||||
endif
|
||||
|
||||
# Fix CXX on Cygwin 1.1.4
|
||||
ifeq ($(CXX),gcc)
|
||||
ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
|
||||
CXX := g++
|
||||
endif
|
||||
|
||||
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
|
||||
# We honor ARFLAGS, but the "v" often option used by default causes a noisy make
|
||||
ifeq ($(ARFLAGS),rv)
|
||||
ARFLAGS = r
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
##### X86/X32/X64 Options #####
|
||||
###########################################################
|
||||
ifeq ($(IS_X86),1)
|
||||
|
||||
ifneq ($(IS_X86)$(IS_X32)$(IS_X64),000)
|
||||
|
||||
# Fixup. Clang integrated assembler will be used (-Wa,-q)
|
||||
ifneq ($(MACPORTS_COMPILER),1)
|
||||
IS_GAS := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler")
|
||||
endif
|
||||
|
||||
ifneq ($(GCC_COMPILER),0)
|
||||
IS_GCC_29 := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c gcc-9[0-9][0-9])
|
||||
GCC42_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[2-9]|[5-9]\.)")
|
||||
GCC46_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[6-9]|[5-9]\.)")
|
||||
endif
|
||||
|
||||
ifneq ($(IS_GAS),0)
|
||||
GAS210_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
|
||||
GAS217_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
|
||||
GAS219_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
|
||||
endif
|
||||
IS_GCC_29 := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c gcc-9[0-9][0-9])
|
||||
GCC42_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[2-9]|[5-9]\.)")
|
||||
GCC46_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[6-9]|[5-9]\.)")
|
||||
GCC48_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[8-9]|[5-9]\.)")
|
||||
GCC49_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.9|[5-9]\.)")
|
||||
|
||||
ICC111_OR_LATER := $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])")
|
||||
GAS210_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
|
||||
GAS217_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
|
||||
GAS219_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
|
||||
|
||||
# Add -fPIC for targets *except* X86, X32, Cygwin or MinGW
|
||||
ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS_MINGW)$(SUN_COMPILER),00000)
|
||||
# Add -fPIC for x86_64, but not X32, Cygwin or MinGW
|
||||
ifneq ($(IS_X86_64),0)
|
||||
IS_X32 := $(shell $(CXX) -dM -E - < /dev/null 2>&1 | $(EGREP) -c "ILP32")
|
||||
ifeq ($(IS_X32)$(IS_CYGWIN)$(IS_MINGW),000)
|
||||
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fPIC
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Guard use of -march=native
|
||||
ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10)
|
||||
ifeq ($(GCC_COMPILER),0)
|
||||
CXXFLAGS += -march=native
|
||||
else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00)
|
||||
else ifneq ($(GCC42_OR_LATER),0)
|
||||
CXXFLAGS += -march=native
|
||||
else
|
||||
# GCC 3.3 and "unknown option -march="
|
||||
# Ubuntu GCC 4.1 compiler crash with -march=native
|
||||
# NetBSD GCC 4.8 compiler and "bad value (native) for -march= switch"
|
||||
# Sun compiler is handled below
|
||||
ifeq ($(SUN_COMPILER)$(IS_X64),01)
|
||||
# GCC 4.1 compiler crash with -march=native.
|
||||
ifneq ($(IS_X86_64),0)
|
||||
CXXFLAGS += -m64
|
||||
else ifeq ($(SUN_COMPILER)$(IS_X86),01)
|
||||
else
|
||||
CXXFLAGS += -m32
|
||||
endif # X86/X32/X64
|
||||
endif
|
||||
|
||||
# Aligned access required for -O3 and above due to vectorization
|
||||
# Aligned access required at -O3 for GCC due to vectorization (circa 08/2008). Expect other compilers to do the same.
|
||||
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
|
||||
ifneq ($(UNALIGNED_ACCESS),0)
|
||||
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
|
||||
ifeq ($(findstring -O3,$(CXXFLAGS)),-O3)
|
||||
ifneq ($(UNALIGNED_ACCESS),0)
|
||||
ifeq ($(GCC46_OR_LATER),1)
|
||||
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # -O3
|
||||
ifeq ($(findstring -O5,$(CXXFLAGS)),-O5)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # -O5
|
||||
ifeq ($(findstring -Ofast,$(CXXFLAGS)),-Ofast)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # -Ofast
|
||||
endif # CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # GCC 4.6
|
||||
endif # UNALIGNED_ACCESS
|
||||
endif # Vectorization
|
||||
|
||||
ifneq ($(INTEL_COMPILER),0)
|
||||
CXXFLAGS += -wd68 -wd186 -wd279 -wd327 -wd161 -wd3180
|
||||
@ -167,100 +109,34 @@ CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
|
||||
endif
|
||||
endif
|
||||
|
||||
# .intel_syntax wasn't supported until GNU assembler 2.10
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS210_OR_LATER),100)
|
||||
ifeq ($(GCC_COMPILER)$(GAS210_OR_LATER),10) # .intel_syntax wasn't supported until GNU assembler 2.10
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
|
||||
else
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS217_OR_LATER),100)
|
||||
ifeq ($(GCC_COMPILER)$(GAS217_OR_LATER),10)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
|
||||
else
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS219_OR_LATER),100)
|
||||
ifeq ($(GCC_COMPILER)$(GAS219_OR_LATER),10)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Tell MacPorts GCC to use Clang integrated assembler
|
||||
# http://github.com/weidai11/cryptopp/issues/190
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER),11)
|
||||
ifneq ($(findstring -Wa,-q,$(CXXFLAGS)),-Wa,-q)
|
||||
CXXFLAGS += -Wa,-q
|
||||
endif
|
||||
ifneq ($(findstring -Wa,-q,$(CXXFLAGS)),-DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
CXXFLAGS += -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1
|
||||
ifneq ($(IS_SUN),0)
|
||||
CXXFLAGS += -Wa,--divide # allow use of "/" operator
|
||||
endif
|
||||
endif
|
||||
|
||||
# GCC on Solaris needs -m64. Otherwise, i386 is default
|
||||
# http://github.com/weidai11/cryptopp/issues/230
|
||||
ifeq ($(IS_SUN)$(GCC_COMPILER)$(IS_X64),111)
|
||||
CXXFLAGS += -m64
|
||||
endif
|
||||
|
||||
# Allow use of "/" operator for GNU Assembler.
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=4572
|
||||
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
|
||||
ifeq ($(IS_SUN)$(GCC_COMPILER),11)
|
||||
CXXFLAGS += -Wa,--divide
|
||||
endif
|
||||
endif
|
||||
endif # IS_X86
|
||||
|
||||
ifeq ($(UNAME),) # for DJGPP, where uname doesn't exist
|
||||
CXXFLAGS += -mbnu210
|
||||
else ifneq ($(findstring -save-temps,$(CXXFLAGS)),-save-temps)
|
||||
ifeq ($(SUN_COMPILER),0)
|
||||
CXXFLAGS += -pipe
|
||||
endif
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
###########################################################
|
||||
##### Not X86/X32/X64 #####
|
||||
###########################################################
|
||||
|
||||
# Add PIC
|
||||
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
# Add -pipe for everything except ARM (allow ARM-64 because they seems to have > 1 GB of memory)
|
||||
ifeq ($(IS_ARM32),0)
|
||||
ifeq ($(findstring -save-temps,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -pipe
|
||||
endif
|
||||
endif
|
||||
|
||||
# Aligned access required for -O3 and above due to vectorization
|
||||
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
|
||||
ifneq ($(UNALIGNED_ACCESS),0)
|
||||
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
|
||||
ifeq ($(findstring -O3,$(CXXFLAGS)),-O3)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # -O3
|
||||
ifeq ($(findstring -O5,$(CXXFLAGS)),-O5)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # -O5
|
||||
ifeq ($(findstring -Ofast,$(CXXFLAGS)),-Ofast)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # -Ofast
|
||||
endif # CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # UNALIGNED_ACCESS
|
||||
|
||||
endif # IS_X86
|
||||
|
||||
###########################################################
|
||||
##### Common #####
|
||||
###########################################################
|
||||
|
||||
ifneq ($(IS_MINGW),0)
|
||||
LDLIBS += -lws2_32
|
||||
endif
|
||||
|
||||
ifneq ($(IS_SUN),0)
|
||||
LDLIBS += -lnsl -lsocket
|
||||
endif
|
||||
|
||||
ifeq ($(IS_LINUX),1)
|
||||
LDFLAGS += -pthread
|
||||
ifeq ($(findstring -fopenmp,$(CXXFLAGS)),-fopenmp)
|
||||
@ -268,8 +144,18 @@ ifeq ($(findstring -lgomp,$(LDLIBS)),)
|
||||
LDLIBS += -lgomp
|
||||
endif # LDLIBS
|
||||
endif # OpenMP
|
||||
ifneq ($(IS_X86_64),0)
|
||||
M32OR64 = -m64
|
||||
endif
|
||||
endif # IS_LINUX
|
||||
|
||||
# And add it for ARM64, too
|
||||
ifneq ($(IS_AARCH64),0)
|
||||
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fPIC
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
AR = libtool
|
||||
ARFLAGS = -static -o
|
||||
@ -281,35 +167,23 @@ LDFLAGS += -flat_namespace -undefined suppress -m
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add -errtags=yes to get the name for a warning suppression
|
||||
ifneq ($(IS_SUN),0)
|
||||
LDLIBS += -lnsl -lsocket
|
||||
M32OR64 = -m$(shell isainfo -b)
|
||||
endif
|
||||
|
||||
ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler
|
||||
IS_64 := $(shell isainfo -b 2>/dev/null | grep -i -c "64")
|
||||
ifeq ($(IS_64),1)
|
||||
CXXFLAGS += -m64
|
||||
else ifeq ($(IS_64),0)
|
||||
CXXFLAGS += -m32
|
||||
endif
|
||||
ifneq ($(SUNCC_513_OR_LATER),0)
|
||||
CXXFLAGS += -native
|
||||
endif
|
||||
# Add for non-i386
|
||||
ifneq ($(IS_X86),1)
|
||||
CXXFLAGS += -KPIC
|
||||
endif
|
||||
# Add to all Solaris
|
||||
CXXFLAGS += -template=no%extdef
|
||||
CXXFLAGS ?= -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
|
||||
LDFLAGS =
|
||||
AR = $(CXX)
|
||||
ARFLAGS = -xar -o
|
||||
RANLIB = true
|
||||
SUN_CC10_BUGGY := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: Sun .* 5\.10 .* (2009|2010/0[1-4])")
|
||||
ifneq ($(SUN_CC10_BUGGY),0)
|
||||
# -DCRYPTOPP_INCLUDE_VECTOR_CC is needed for Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21 and was fixed in May 2010
|
||||
# remove it if you get "already had a body defined" errors in vector.cc
|
||||
CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC
|
||||
endif
|
||||
#ifneq ($SUNCC_512_OR_LATER),0)
|
||||
#CXXFLAGS += -xarch=aes -D__AES__=1 -xarch=no%sse4_1 -xarch=no%sse4_2
|
||||
#endif
|
||||
AR = $(CXX)
|
||||
ARFLAGS = -xar -o
|
||||
RANLIB = true
|
||||
endif
|
||||
|
||||
# Undefined Behavior Sanitizer (UBsan) testing. There's no sense in
|
||||
@ -323,72 +197,71 @@ CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # CXXFLAGS
|
||||
endif # UBsan
|
||||
|
||||
# Address Sanitizer (Asan) testing. Issue 'make asan'.
|
||||
# Address Sanitizer (Asan) testing
|
||||
ifeq ($(findstring asan,$(MAKECMDGOALS)),asan)
|
||||
ifeq ($(findstring -fsanitize=address,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fsanitize=address
|
||||
endif # CXXFLAGS
|
||||
ifeq ($(findstring -fno-omit-frame-pointer,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fno-omit-frame-pointer
|
||||
endif # CXXFLAGS
|
||||
endif # Asan
|
||||
|
||||
# LD gold linker testing. Triggered by 'LD=ld.gold'.
|
||||
# LD gold linker testing
|
||||
ifeq ($(findstring ld.gold,$(LD)),ld.gold)
|
||||
ifeq ($(findstring -fuse-ld=gold,$(CXXFLAGS)),)
|
||||
ifeq ($(findstring -Wl,-fuse-ld=gold,$(CXXFLAGS)),)
|
||||
ELF_FORMAT := $(shell file `which ld.gold` 2>&1 | cut -d":" -f 2 | $(EGREP) -i -c "elf")
|
||||
ifneq ($(ELF_FORMAT),0)
|
||||
LDFLAGS += -fuse-ld=gold
|
||||
GOLD_OPTION = -Wl,-fuse-ld=gold
|
||||
endif # ELF/ELF64
|
||||
endif # CXXFLAGS
|
||||
endif # Gold
|
||||
|
||||
# Aligned access testing. Issue 'make aligned'.
|
||||
# Aligned access testing
|
||||
ifneq ($(filter align aligned,$(MAKECMDGOALS)),)
|
||||
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # CXXFLAGS
|
||||
endif # # CXXFLAGS
|
||||
endif # Aligned access
|
||||
|
||||
# GCC code coverage. Issue 'make coverage'.
|
||||
ifneq ($(filter coverage,$(MAKECMDGOALS)),)
|
||||
ifeq ($(findstring -coverage,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -coverage
|
||||
endif # -coverage
|
||||
endif # GCC code coverage
|
||||
|
||||
# Debug testing on GNU systems. Triggered by -DDEBUG.
|
||||
# Newlib test due to http://sourceware.org/bugzilla/show_bug.cgi?id=20268
|
||||
# Debug testing on GNU systems
|
||||
ifneq ($(filter -DDEBUG -DDEBUG=1,$(CXXFLAGS)),)
|
||||
USING_GLIBCXX := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__GLIBCXX__")
|
||||
ifneq ($(USING_GLIBCXX),0)
|
||||
HAS_NEWLIB := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__NEWLIB__")
|
||||
ifeq ($(HAS_NEWLIB),0)
|
||||
ifeq ($(findstring -D_GLIBCXX_DEBUG,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -D_GLIBCXX_DEBUG
|
||||
endif # CXXFLAGS
|
||||
endif # NAS_NEWLIB
|
||||
ifeq ($(findstring -D_GLIBCXX_CONCEPT_CHECKS,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -D_GLIBCXX_CONCEPT_CHECKS
|
||||
endif # CXXFLAGS
|
||||
endif # USING_GLIBCXX
|
||||
endif # GNU Debug build
|
||||
|
||||
# Dead code stripping. Issue 'make lean'.
|
||||
ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
|
||||
ifeq ($(findstring -ffunction-sections,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -ffunction-sections
|
||||
endif # CXXFLAGS
|
||||
ifeq ($(findstring -fdata-sections,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fdata-sections
|
||||
endif # CXXFLAGS
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
ifeq ($(findstring -Wl,-dead_strip,$(LDFLAGS)),)
|
||||
LDFLAGS += -Wl,-dead_strip
|
||||
endif # CXXFLAGS
|
||||
else # BSD, Linux and Unix
|
||||
ifeq ($(findstring -Wl,--gc-sections,$(LDFLAGS)),)
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
endif # LDFLAGS
|
||||
endif # MAKECMDGOALS
|
||||
endif # Dead code stripping
|
||||
# List cryptlib.cpp first and cpu.o second in an attempt to tame C++ static initialization problems. The issue
|
||||
# spills into POD data types, so cpu.cpp is the second candidate for explicit initialization order.
|
||||
SRCS := cryptlib.cpp cpu.cpp $(filter-out cryptlib.cpp cpu.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
|
||||
|
||||
# No need for CPU or RDRAND on non-X86 systems. X32 is represented with X64.
|
||||
ifeq ($(IS_X86)$(IS_X86_64),00)
|
||||
SRCS := $(filter-out cpu.cpp rdrand.cpp, $(SRCS))
|
||||
endif
|
||||
|
||||
ifneq ($(IS_MINGW),0)
|
||||
SRCS += winpipes.cpp
|
||||
endif
|
||||
|
||||
# List of objects with crytlib.o and cpu.o at the first and second index position
|
||||
OBJS := $(SRCS:.cpp=.o)
|
||||
|
||||
# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
|
||||
TESTOBJS := bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
|
||||
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
|
||||
|
||||
# List cryptlib.cpp first in an attempt to tame C++ static initialization problems
|
||||
DLLSRCS := cryptlib.cpp algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
|
||||
DLLOBJS := $(DLLSRCS:.cpp=.export.o)
|
||||
|
||||
# Import lib testing
|
||||
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
|
||||
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
|
||||
DLLTESTOBJS := dlltest.dllonly.o
|
||||
|
||||
# For Shared Objects, Diff, Dist/Zip rules
|
||||
LIB_VER := $(shell $(EGREP) "define CRYPTOPP_VERSION" config.h | cut -d" " -f 3)
|
||||
@ -400,56 +273,6 @@ ifeq ($(strip $(LIB_PATCH)),)
|
||||
LIB_PATCH := 0
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
# Full version suffix for shared library
|
||||
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
|
||||
# Different patchlevels are compatible, minor versions are not
|
||||
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
|
||||
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
endif # HAS_SOLIB_VERSION
|
||||
|
||||
###########################################################
|
||||
##### Source and object files #####
|
||||
###########################################################
|
||||
|
||||
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
|
||||
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
|
||||
|
||||
# Need CPU for X86/X64/X32 and ARM
|
||||
ifeq ($(IS_X86)$(IS_X64)$(IS_ARM32)$(IS_ARM64),0000)
|
||||
SRCS := $(filter-out cpu.cpp, $(SRCS))
|
||||
endif
|
||||
# Need RDRAND for X86/X64/X32
|
||||
ifeq ($(IS_X86)$(IS_X64),00)
|
||||
SRCS := $(filter-out rdrand.cpp, $(SRCS))
|
||||
endif
|
||||
|
||||
ifneq ($(IS_MINGW),0)
|
||||
SRCS += winpipes.cpp
|
||||
endif
|
||||
|
||||
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
|
||||
OBJS := $(SRCS:.cpp=.o)
|
||||
|
||||
# List test.cpp first to tame C++ static initialization problems.
|
||||
TESTSRCS := test.cpp bench1.cpp bench2.cpp validat1.cpp validat2.cpp validat3.cpp adhoc.cpp datatest.cpp regtest.cpp fipsalgt.cpp dlltest.cpp
|
||||
TESTOBJS := $(TESTSRCS:.cpp=.o)
|
||||
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
|
||||
|
||||
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
|
||||
DLLSRCS := cryptlib.cpp cpu.cpp integer.cpp shacal2.cpp md5.cpp shark.cpp zinflate.cpp gf2n.cpp salsa.cpp xtr.cpp oaep.cpp polynomi.cpp rc2.cpp default.cpp wait.cpp wake.cpp twofish.cpp iterhash.cpp adler32.cpp elgamal.cpp marss.cpp blowfish.cpp ecp.cpp filters.cpp strciphr.cpp camellia.cpp ida.cpp zlib.cpp des.cpp crc.cpp algparam.cpp dessp.cpp tea.cpp eax.cpp network.cpp emsa2.cpp pkcspad.cpp squaretb.cpp idea.cpp authenc.cpp hmac.cpp zdeflate.cpp xtrcrypt.cpp queue.cpp mars.cpp rc5.cpp blake2.cpp hrtimer.cpp eprecomp.cpp hex.cpp dsa.cpp sha.cpp fips140.cpp gzip.cpp seal.cpp files.cpp base32.cpp vmac.cpp tigertab.cpp sharkbox.cpp safer.cpp randpool.cpp esign.cpp arc4.cpp osrng.cpp skipjack.cpp seed.cpp sha3.cpp sosemanuk.cpp bfinit.cpp rabin.cpp 3way.cpp rw.cpp rdrand.cpp rsa.cpp rdtables.cpp gost.cpp socketft.cpp tftables.cpp nbtheory.cpp panama.cpp modes.cpp rijndael.cpp casts.cpp chacha.cpp gfpcrypt.cpp poly1305.cpp dll.cpp ec2n.cpp blumshub.cpp algebra.cpp basecode.cpp base64.cpp cbcmac.cpp rc6.cpp dh2.cpp gf256.cpp mqueue.cpp misc.cpp pssr.cpp channels.cpp tiger.cpp cast.cpp rng.cpp square.cpp asn.cpp whrlpool.cpp md4.cpp dh.cpp ccm.cpp md2.cpp mqv.cpp gf2_32.cpp ttmac.cpp luc.cpp trdlocal.cpp pubkey.cpp gcm.cpp ripemd.cpp eccrypto.cpp serpent.cpp cmac.cpp
|
||||
DLLOBJS := $(DLLSRCS:.cpp=.export.o)
|
||||
|
||||
# Import lib testing
|
||||
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
|
||||
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
|
||||
DLLTESTOBJS := dlltest.dllonly.o
|
||||
|
||||
###########################################################
|
||||
##### Targets and Recipes #####
|
||||
###########################################################
|
||||
|
||||
.PHONY: all
|
||||
all: cryptest.exe
|
||||
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
@ -457,82 +280,49 @@ static: libcryptopp.a
|
||||
shared dynamic dylib: libcryptopp.dylib
|
||||
else
|
||||
static: libcryptopp.a
|
||||
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
shared dynamic: libcryptopp.so
|
||||
endif
|
||||
|
||||
.PHONY: deps
|
||||
deps GNUmakefile.deps:
|
||||
$(CXX) $(CXXFLAGS) -MM *.cpp > GNUmakefile.deps
|
||||
|
||||
# CXXFLAGS are tuned earlier.
|
||||
.PHONY: asan ubsan align aligned
|
||||
asan ubsan align aligned: libcryptopp.a cryptest.exe
|
||||
|
||||
# CXXFLAGS are tuned earlier. Applications must use linker flags
|
||||
# -Wl,--gc-sections (Linux and Unix) or -Wl,-dead_strip (OS X)
|
||||
.PHONY: lean
|
||||
lean: static dynamic cryptest.exe
|
||||
|
||||
# May want to export CXXFLAGS="-g3 -O1"
|
||||
.PHONY: coverage
|
||||
coverage: libcryptopp.a cryptest.exe
|
||||
lcov --base-directory . --directory . --zerocounters -q
|
||||
./cryptest.exe v
|
||||
./cryptest.exe tv all
|
||||
lcov --base-directory . --directory . -c -o cryptest.info
|
||||
lcov --remove cryptest.info "*test.*" "bench*.cpp" "validat*.*" "/usr/*" -o cryptest.info
|
||||
rm -rf ./TestCoverage/
|
||||
genhtml -o ./TestCoverage/ -t "cryptest.exe test coverage" --num-spaces 4 cryptest.info
|
||||
|
||||
.PHONY: test check
|
||||
test check: cryptest.exe
|
||||
./cryptest.exe v
|
||||
|
||||
# Used to generate list of source files for Autotools, CMakeList, Android.mk, etc
|
||||
.PHONY: sources
|
||||
sources:
|
||||
$(info Library sources: $(filter-out fipstest.cpp $(TESTSRCS),$(SRCS)))
|
||||
$(info )
|
||||
$(info Test sources: $(TESTSRCS))
|
||||
|
||||
# Directory we want (can't specify on Doygen command line)
|
||||
DOCUMENT_DIRECTORY := ref$(LIB_VER)
|
||||
# Directory Doxygen uses (specified in Doygen config file)
|
||||
ifeq ($(wildcard Doxyfile),Doxyfile)
|
||||
DOXYGEN_DIRECTORY := $(strip $(shell $(EGREP) "OUTPUT_DIRECTORY" Doxyfile | grep -v "\#" | cut -d "=" -f 2))
|
||||
endif
|
||||
# Default directory (in case its missing in the config file)
|
||||
# Default directory (missing in config file)
|
||||
ifeq ($(strip $(DOXYGEN_DIRECTORY)),)
|
||||
DOXYGEN_DIRECTORY := html-docs
|
||||
endif
|
||||
|
||||
# Builds the documentation. Directory name is ref563, ref570, etc.
|
||||
.PHONY: docs html
|
||||
docs html:
|
||||
-$(RM) -r $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/ html-docs/
|
||||
doxygen Doxyfile -d CRYPTOPP_DOXYGEN_PROCESSING
|
||||
$(MV) $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/
|
||||
mv $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/
|
||||
-$(RM) CryptoPPRef.zip
|
||||
zip -9 CryptoPPRef.zip -x ".*" -x "*/.*" -r $(DOCUMENT_DIRECTORY)/
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-$(RM) libcryptopp.a libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
endif
|
||||
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
||||
-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct rdrand-???.o
|
||||
-$(RM) *.gcno *.gcda *.stackdump core-*
|
||||
-$(RM) /tmp/adhoc.exe
|
||||
ifneq ($(wildcard /tmp/cryptopp_test/),)
|
||||
-$(RM) -r /tmp/cryptopp_test/
|
||||
endif
|
||||
-$(RM) libcryptopp.a libcryptopp.so libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a
|
||||
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS) *.stackdump core-*
|
||||
-$(RM) cryptest.exe dlltest.exe cryptest.import.exe ct rdrand-???.o
|
||||
ifneq ($(wildcard *.exe.dSYM),)
|
||||
-$(RM) -r *.exe.dSYM/
|
||||
endif
|
||||
ifneq ($(wildcard *.dylib.dSYM),)
|
||||
-$(RM) -r *.dylib.dSYM/
|
||||
ifneq ($(wildcard $(DOCUMENT_DIRECTORY)/),)
|
||||
-$(RM) -r $(DOCUMENT_DIRECTORY)/
|
||||
endif
|
||||
ifneq ($(wildcard cov-int/),)
|
||||
-$(RM) -r cov-int/
|
||||
@ -540,18 +330,7 @@ endif
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt
|
||||
-$(RM) CMakeCache.txt Makefile CTestTestfile.cmake cmake_install.cmake cryptopp-config-version.cmake
|
||||
-$(RM) cryptopp.tgz *.o *.bc *.ii *.s *~
|
||||
ifneq ($(wildcard CMakeFiles/),)
|
||||
-$(RM) -r CMakeFiles/
|
||||
endif
|
||||
ifneq ($(wildcard $(DOCUMENT_DIRECTORY)/),)
|
||||
-$(RM) -r $(DOCUMENT_DIRECTORY)/
|
||||
endif
|
||||
ifneq ($(wildcard TestCoverage/),)
|
||||
-$(RM) -r TestCoverage/
|
||||
endif
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt *.o *.ii *.s
|
||||
ifneq ($(wildcard cryptopp$(LIB_VER)\.*),)
|
||||
-$(RM) cryptopp$(LIB_VER)\.*
|
||||
endif
|
||||
@ -564,87 +343,47 @@ endif
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
$(MKDIR) -p $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
|
||||
ifneq ($(wildcard libcryptopp.a),)
|
||||
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
|
||||
-$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
endif
|
||||
ifneq ($(wildcard cryptest.exe),)
|
||||
$(MKDIR) -p $(DESTDIR)$(BINDIR)
|
||||
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
$(MKDIR) -p $(DESTDIR)$(DATADIR)/cryptopp
|
||||
$(CP) -r TestData $(DESTDIR)$(DATADIR)/cryptopp
|
||||
$(CP) -r TestVectors $(DESTDIR)$(DATADIR)/cryptopp
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(DATADIR)/cryptopp
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(DATADIR)/cryptopp/TestData
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
|
||||
-$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestData/*.dat
|
||||
-$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors/*.txt
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.dylib),)
|
||||
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
|
||||
-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
|
||||
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
|
||||
-$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(LN) -sf libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
|
||||
$(LDCONF) $(DESTDIR)$(LIBDIR)
|
||||
endif
|
||||
$(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
|
||||
-$(CP) *.h $(PREFIX)/include/cryptopp
|
||||
-$(CHMOD) 755 $(PREFIX)/include/cryptopp
|
||||
-$(CHMOD) 644 $(PREFIX)/include/cryptopp/*.h
|
||||
-$(CP) libcryptopp.a $(PREFIX)/lib
|
||||
-$(CHMOD) 644 $(PREFIX)/lib/libcryptopp.a
|
||||
-$(CP) cryptest.exe $(PREFIX)/bin
|
||||
-$(CHMOD) 755 $(PREFIX)/bin/cryptest.exe
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-$(CP) libcryptopp.dylib $(PREFIX)/lib
|
||||
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.dylib
|
||||
else
|
||||
-$(CP) libcryptopp.so $(PREFIX)/lib
|
||||
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.so
|
||||
endif
|
||||
|
||||
.PHONY: remove uninstall
|
||||
remove uninstall:
|
||||
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
-$(RM) -r $(DESTDIR)$(DATADIR)/cryptopp
|
||||
-$(RM) -r $(PREFIX)/include/cryptopp
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.a
|
||||
-$(RM) $(PREFIX)/bin/cryptest.exe
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.dylib
|
||||
else
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so
|
||||
$(LDCONF) $(DESTDIR)$(LIBDIR)
|
||||
endif
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.so
|
||||
endif
|
||||
|
||||
libcryptopp.a: $(LIBOBJS)
|
||||
libcryptopp.a: public_service | $(LIBOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
ifeq ($(IS_SUN),0)
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
.PHONY: libcryptopp.so
|
||||
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX) | so_warning
|
||||
endif
|
||||
|
||||
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS)
|
||||
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(CXXFLAGS) $(LDFLAGS) $(LIBOBJS) $(LDLIBS)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so
|
||||
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
endif
|
||||
libcryptopp.so: public_service | $(LIBOBJS)
|
||||
$(CXX) -shared -o $@ $(CXXFLAGS) $(GOLD_OPTION) $(LIBOBJS) $(LDLIBS)
|
||||
|
||||
libcryptopp.dylib: $(LIBOBJS)
|
||||
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
|
||||
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" $(LIBOBJS)
|
||||
|
||||
cryptest.exe: libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
|
||||
cryptest.exe: public_service | libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(GOLD_OPTION) $(LDLIBS)
|
||||
|
||||
# Makes it faster to test changes
|
||||
nolib: $(OBJS)
|
||||
nolib: $(OBJS) # makes it faster to test changes
|
||||
$(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
dll: cryptest.import.exe dlltest.exe
|
||||
@ -654,9 +393,7 @@ cryptopp.dll: $(DLLOBJS)
|
||||
|
||||
libcryptopp.import.a: $(LIBIMPORTOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS)
|
||||
ifeq ($(IS_SUN),0)
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
|
||||
cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTIMPORTOBJS) -L. -lcryptopp.dll -lcryptopp.import $(LDFLAGS) $(LDLIBS)
|
||||
@ -664,58 +401,36 @@ cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
|
||||
dlltest.exe: cryptopp.dll $(DLLTESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
# This recipe requires a previous "svn co -r 541 http://svn.code.sf.net/p/cryptopp/code/trunk/c5"
|
||||
.PHONY: diff
|
||||
diff:
|
||||
-$(RM) cryptopp$(LIB_VER).diff
|
||||
-svn diff -r 541 > cryptopp$(LIB_VER).diff
|
||||
|
||||
# This recipe prepares the distro files
|
||||
TEXT_FILES := *.h *.cpp adhoc.cpp.proto License.txt Readme.txt Install.txt Filelist.txt CMakeLists.txt config.compat Doxyfile cryptest* cryptlib* dlltest* cryptdll* *.sln *.vcxproj *.filters cryptopp.rc TestVectors/*.txt TestData/*.dat TestScripts/*.sh TestScripts/*.pl TestScripts/*.cmd
|
||||
EXEC_FILES := GNUmakefile GNUmakefile-cross TestData/ TestVectors/ TestScripts/
|
||||
TEXT_FILES := *.h *.cpp adhoc.cpp.proto License.txt Readme.txt Install.txt Filelist.txt config.recommend Doxyfile cryptest* cryptlib* dlltest* cryptdll* *.sln *.vcproj *.dsw *.dsp cryptopp.rc TestVectors/*.txt TestData/*.dat
|
||||
EXEC_FILES := GNUmakefile GNUmakefile-cross cryptest.sh rdrand-nasm.sh TestData/ TestVectors/
|
||||
|
||||
ifeq ($(wildcard Filelist.txt),Filelist.txt)
|
||||
DIST_FILES := $(shell cat Filelist.txt)
|
||||
endif
|
||||
|
||||
.PHONY: trim
|
||||
trim:
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
sed -i '' -e's/[[:space:]]*$$//' *.compat *.sh *.h *.cpp *.sln *.vcxproj GNUmakefile GNUmakefile-cross
|
||||
make convert
|
||||
else
|
||||
sed -i -e's/[[:space:]]*$$//' *.compat *.sh *.h *.cpp *.sln *.vcxproj GNUmakefile GNUmakefile-cross
|
||||
make convert
|
||||
endif
|
||||
|
||||
.PHONY: convert
|
||||
convert:
|
||||
-$(CHMOD) 0700 TestVectors/ TestData/ TestScripts/
|
||||
-$(CHMOD) 0600 $(TEXT_FILES) *.asm *.S *.zip *.cmake TestVectors/*.txt TestData/*.dat
|
||||
-$(CHMOD) 0700 $(EXEC_FILES) *.sh *.cmd TestScripts/*.sh TestScripts/*.pl TestScripts/*.cmd
|
||||
-$(CHMOD) 0700 *.cmd *.sh GNUmakefile GNUmakefile-cross TestScripts/*.sh TestScripts/*.pl
|
||||
-unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd *.cmake TestScripts/*.pl TestScripts/*.cmd
|
||||
-dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.S *.sh TestScripts/*.sh
|
||||
chmod 0700 TestVectors/ TestData/
|
||||
chmod 0600 $(TEXT_FILES) *.zip
|
||||
chmod 0700 $(EXEC_FILES)
|
||||
chmod u+x *.cmd *.sh
|
||||
unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd
|
||||
dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.S *.sh
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-xattr -c *
|
||||
xattr -c *
|
||||
endif
|
||||
|
||||
# Build the ZIP file with source files. No documentation.
|
||||
.PHONY: zip dist
|
||||
zip dist: | distclean convert
|
||||
zip dist: | distclean convert diff
|
||||
zip -q -9 cryptopp$(LIB_VER).zip $(DIST_FILES)
|
||||
|
||||
# Build the ISO to transfer the ZIP to old distros via CDROM
|
||||
.PHONY: iso
|
||||
iso: | zip
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
$(MKDIR) -p $(PWD)/cryptopp$(LIB_VER)
|
||||
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
||||
hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
||||
-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
|
||||
else ifneq ($(IS_LINUX),0)
|
||||
$(MKDIR) -p $(PWD)/cryptopp$(LIB_VER)
|
||||
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
|
||||
genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
|
||||
-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
|
||||
endif
|
||||
|
||||
# CRYPTOPP_CPU_SPEED in GHz
|
||||
CRYPTOPP_CPU_SPEED ?= 2.4
|
||||
.PHONY: bench benchmark benchmarks
|
||||
bench benchmark benchmarks: cryptest.exe
|
||||
rm -f benchmarks.html
|
||||
@ -725,9 +440,9 @@ bench benchmark benchmarks: cryptest.exe
|
||||
echo "<TITLE>Speed Comparison of Popular Crypto Algorithms</TITLE>" >> benchmarks.html
|
||||
echo "</HEAD>" >> benchmarks.html
|
||||
echo "<BODY>" >> benchmarks.html
|
||||
echo "<H1><a href=\"http://www.cryptopp.com\">Crypto++</a>" $(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH) "Benchmarks</H1>" >> benchmarks.html
|
||||
echo "<H1><a href=\"http://www.cryptopp.com\">Crypto++</a>" $(LIB_MAJOR).$(LIB_MINOR).$(LIB_REVISION) "Benchmarks</H1>" >> benchmarks.html
|
||||
echo "<P>Here are speed benchmarks for some commonly used cryptographic algorithms.</P>" >> benchmarks.html
|
||||
./cryptest.exe b 3 $(CRYPTOPP_CPU_SPEED) >> benchmarks.html
|
||||
./cryptest.exe b 3 2.4 >> benchmarks.html
|
||||
echo "</BODY>" >> benchmarks.html
|
||||
echo "</HTML>" >> benchmarks.html
|
||||
|
||||
@ -754,20 +469,6 @@ cpu.o:
|
||||
endif
|
||||
endif
|
||||
|
||||
# Only use CRYPTOPP_DATA_DIR if its not set in CXXFLAGS
|
||||
ifeq ($(findstring -DCRYPTOPP_DATA_DIR,$(CXXFLAGS)),)
|
||||
ifneq ($(strip $(CRYPTOPP_DATA_DIR)),)
|
||||
validat%.o : validat%.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
|
||||
bench%.o : bench%.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
|
||||
datatest.o : datatest.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
|
||||
test.o : test.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
|
||||
endif
|
||||
endif
|
||||
|
||||
%.dllonly.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DLL_ONLY -c $< -o $@
|
||||
|
||||
@ -777,17 +478,27 @@ endif
|
||||
%.export.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
|
||||
|
||||
%.bc : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $<
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $<
|
||||
|
||||
.PHONY: so_warning
|
||||
so_warning:
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
$(info WARNING: Only the symlinks to the shared-object library have been updated.)
|
||||
$(info WARNING: If the library is installed in a system directory you will need)
|
||||
$(info WARNING: to run 'ldconfig' to update the shared-object library cache.)
|
||||
# Warn of potential configurations issues. They will go away after 5.6.3.
|
||||
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
|
||||
NO_INIT_PRIORITY := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_INIT_PRIORITY" config.h)
|
||||
COMPATIBILITY_562 := $(shell $(EGREP) -c "^[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562" config.h)
|
||||
.PHONY: public_service
|
||||
public_service:
|
||||
ifneq ($(UNALIGNED_ACCESS),0)
|
||||
$(info WARNING: CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined in config.h.)
|
||||
endif
|
||||
ifneq ($(NO_INIT_PRIORITY),0)
|
||||
$(info WARNING: CRYPTOPP_INIT_PRIORITY is not defined in config.h.)
|
||||
endif
|
||||
ifneq ($(COMPATIBILITY_562),0)
|
||||
$(info WARNING: CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 is defined in config.h.)
|
||||
endif
|
||||
ifneq ($(UNALIGNED_ACCESS)$(NO_INIT_PRIORITY)$(COMPATIBILITY_562),000)
|
||||
$(info WARNING: You should make these changes in config.h, and not CXXFLAGS.)
|
||||
$(info WARNING: You can 'mv config.recommend config.h', but it breaks versioning.)
|
||||
$(info WARNING: See http://cryptopp.com/wiki/config.h for more details.)
|
||||
$(info )
|
||||
endif
|
||||
|
||||
252
Common/3dParty/cryptopp/GNUmakefile-cross
Executable file → Normal file
252
Common/3dParty/cryptopp/GNUmakefile-cross
Executable file → Normal file
@ -4,50 +4,26 @@ CXXFLAGS ?= -DNDEBUG -g2 -Os -fPIC -pipe
|
||||
# CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
# LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
AR ?= ar
|
||||
ARFLAGS ?= cr
|
||||
ARFLAGS = -cr # ar needs the dash on OpenBSD
|
||||
RANLIB ?= ranlib
|
||||
CP ?= cp
|
||||
MV ?= mv
|
||||
CHMOD ?= chmod
|
||||
MKDIR ?= mkdir
|
||||
EGREP ?= egrep
|
||||
LN ?= ln -sf
|
||||
CP = cp
|
||||
MKDIR = mkdir
|
||||
EGREP = egrep
|
||||
CHMOD = chmod
|
||||
|
||||
CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
|
||||
|
||||
IS_IOS ?= 0
|
||||
IS_ANDROID ?= 0
|
||||
IS_ARM_EMBEDDED ?= 0
|
||||
|
||||
# Can be used by Android and Embeeded cross-compiles. Disable by default because
|
||||
# Android and embedded users typically don't run this configuration.
|
||||
HAS_SOLIB_VERSION ?= 0
|
||||
IS_X86=0
|
||||
IS_LINUX=0
|
||||
IS_MINGW=0
|
||||
IS_DARWIN=0
|
||||
UNAME=CrossCompile
|
||||
|
||||
# Default prefix for make install
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX = /usr/local
|
||||
endif
|
||||
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
ifeq ($(DATADIR),)
|
||||
DATADIR := $(PREFIX)/share
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(BINDIR),)
|
||||
BINDIR := $(PREFIX)/bin
|
||||
endif
|
||||
ifeq ($(INCLUDEDIR),)
|
||||
INCLUDEDIR := $(PREFIX)/include
|
||||
endif
|
||||
|
||||
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
|
||||
ifeq ($(ARFLAGS),rv)
|
||||
ARFLAGS = r
|
||||
endif
|
||||
|
||||
# Sadly, we can't actually use GCC_PRAGMA_AWARE because of GCC bug 53431.
|
||||
# Its a shame because GCC has so much to offer by the way of analysis.
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
|
||||
@ -55,200 +31,120 @@ ifneq ($(CLANG_COMPILER),0)
|
||||
CXXFLAGS += -Wall
|
||||
endif
|
||||
|
||||
# iOS cross-compile configuration.
|
||||
# iOS cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
|
||||
# See http://www.cryptopp.com/wiki/iOS_(Command_Line).
|
||||
ifeq ($(IS_IOS),1)
|
||||
CXX = clang++
|
||||
|
||||
CXXFLAGS += $(IOS_FLAGS) -arch $(IOS_ARCH)
|
||||
CXXFLAGS += -isysroot $(IOS_SYSROOT) -stdlib=libc++
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(IOS_FLAGS)
|
||||
CXXFLAGS += -arch $(IOS_ARCH) -isysroot $(IOS_SYSROOT)
|
||||
CXXFLAGS += -stdlib=libc++
|
||||
|
||||
AR = libtool
|
||||
ARFLAGS = -static -o
|
||||
RANLIB = ranlib
|
||||
endif
|
||||
|
||||
# Android cross-compile configuration.
|
||||
# Android cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
|
||||
# See http://www.cryptopp.com/wiki/Android_(Command_Line).
|
||||
ifeq ($(IS_ANDROID),1)
|
||||
# CPP, CXX, AR, RANLIB, LD, etc are set in 'setenv-android.sh'
|
||||
CXXFLAGS += $(AOSP_FLAGS) -DANDROID --sysroot=$(AOSP_SYSROOT)
|
||||
CXXFLAGS += -Wa,--noexecstack -I$(AOSP_STL_INC)
|
||||
|
||||
# c++config.h shows up in odd places at times.
|
||||
ifneq ($(AOSP_BITS_INC),)
|
||||
CXXFLAGS += -I$(AOSP_BITS_INC)
|
||||
endif
|
||||
|
||||
LDLIBS += $(AOSP_STL_LIB)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(ANDROID_FLAGS)
|
||||
CXXFLAGS += --sysroot=$(ANDROID_SYSROOT) -I$(ANDROID_STL_INC)
|
||||
LDLIBS += $(ANDROID_STL_LIB)
|
||||
endif
|
||||
|
||||
# ARM embedded cross-compile configuration.
|
||||
# ARM embedded cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
|
||||
# See http://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line)
|
||||
# and http://www.cryptopp.com/wiki/ARM_Embedded_(Bare Metal).
|
||||
ifeq ($(IS_ARM_EMBEDDED),1)
|
||||
# CPP, CXX, AR, RANLIB, LD, etc are set in 'setenv-embedded.sh'
|
||||
CXXFLAGS += $(ARM_EMBEDDED_FLAGS) --sysroot=$(ARM_EMBEDDED_SYSROOT)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(ARM_EMBEDDED_FLAGS)
|
||||
CXXFLAGS += --sysroot=$(ARM_EMBEDDED_SYSROOT)
|
||||
endif
|
||||
|
||||
# Dead code stripping. Issue 'make lean'.
|
||||
ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
|
||||
ifeq ($(findstring -ffunction-sections,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -ffunction-sections
|
||||
endif # CXXFLAGS
|
||||
ifeq ($(findstring -fdata-sections,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fdata-sections
|
||||
endif # CXXFLAGS
|
||||
ifeq ($(IS_IOS),1)
|
||||
ifeq ($(findstring -Wl,-dead_strip,$(LDFLAGS)),)
|
||||
LDFLAGS += -Wl,-dead_strip
|
||||
endif # CXXFLAGS
|
||||
else # BSD, Linux and Unix
|
||||
ifeq ($(findstring -Wl,--gc-sections,$(LDFLAGS)),)
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
endif # LDFLAGS
|
||||
endif # MAKECMDGOALS
|
||||
endif # Dead code stripping
|
||||
# List cryptlib.cpp first in an attempt to tame C++ static initialization problems
|
||||
SRCS := cryptlib.cpp cpu.cpp $(filter-out cryptlib.cpp cpu.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
|
||||
|
||||
# List cryptlib.cpp first and cpu.cpp second in an attempt to tame C++ static initialization problems.
|
||||
# The issue spills into POD data types of cpu.cpp due to the storage class of the bools, so cpu.cpp
|
||||
# is the second candidate for explicit initialization order.
|
||||
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
|
||||
# List of objects with crytlib.o at the first index position
|
||||
OBJS := $(SRCS:.cpp=.o)
|
||||
|
||||
# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
|
||||
TESTSRCS := bench1.cpp bench2.cpp test.cpp validat1.cpp validat2.cpp validat3.cpp adhoc.cpp datatest.cpp regtest.cpp fipsalgt.cpp dlltest.cpp
|
||||
TESTOBJS := $(TESTSRCS:.cpp=.o)
|
||||
TESTOBJS := bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
|
||||
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
|
||||
|
||||
# For Shared Objects, Diff, Dist/Zip rules
|
||||
LIB_VER := $(shell $(EGREP) "define CRYPTOPP_VERSION" config.h | cut -d" " -f 3)
|
||||
LIB_MAJOR := $(shell echo $(LIB_VER) | cut -c 1)
|
||||
LIB_MINOR := $(shell echo $(LIB_VER) | cut -c 2)
|
||||
LIB_PATCH := $(shell echo $(LIB_VER) | cut -c 3)
|
||||
# List cryptlib.cpp first in an attempt to tame C++ static initialization problems
|
||||
DLLSRCS := cryptlib.cpp cpu.cpp algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
|
||||
DLLOBJS := $(DLLSRCS:.cpp=.export.o)
|
||||
|
||||
ifeq ($(strip $(LIB_PATCH)),)
|
||||
LIB_PATCH := 0
|
||||
endif
|
||||
# Import lib testing
|
||||
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
|
||||
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
|
||||
DLLTESTOBJS := dlltest.dllonly.o
|
||||
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
# Full version suffix for shared library
|
||||
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
|
||||
# Different patchlevels are compatible, minor versions are not
|
||||
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
|
||||
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
endif # HAS_SOLIB_VERSION
|
||||
|
||||
.PHONY: all
|
||||
all: cryptest.exe
|
||||
|
||||
ifneq ($(IS_IOS),0)
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
static: libcryptopp.a
|
||||
shared dynamic dylib: libcryptopp.dylib
|
||||
else
|
||||
static: libcryptopp.a
|
||||
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
shared dynamic: libcryptopp.so
|
||||
endif
|
||||
|
||||
test: cryptest.exe
|
||||
./cryptest.exe v
|
||||
|
||||
# CXXFLAGS are tuned earlier. Applications must use linker flags
|
||||
# -Wl,--gc-sections (Linux and Unix) or -Wl,-dead_strip (OS X)
|
||||
.PHONY: lean
|
||||
lean: static dynamic cryptest.exe
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-$(RM) cryptest.exe libcryptopp.a libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.dylib
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
endif
|
||||
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS)
|
||||
ifneq ($(wildcard *.exe.dSYM),)
|
||||
-$(RM) -r *.exe.dSYM/
|
||||
endif
|
||||
ifneq ($(wildcard *.dylib.dSYM),)
|
||||
-$(RM) -r *.dylib.dSYM/
|
||||
-$(RM) cryptest.exe dlltest.exe libcryptopp.a libcryptopp.so libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe ct
|
||||
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
||||
ifneq ($(wildcard *.dSYM),)
|
||||
-$(RM) -r cryptest.exe.dSYM dlltest.exe.dSYM
|
||||
endif
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps cryptopp.tgz *.o *.ii *.s
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps cryptopp$(LIB_VER).diff cryptopp$(LIB_VER).zip *.o *.ii *.s
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
$(MKDIR) -p $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(CHMOD) 755 $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(CHMOD) 644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
|
||||
ifneq ($(wildcard cryptest.exe),)
|
||||
$(MKDIR) -p $(DESTDIR)$(BINDIR)
|
||||
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
|
||||
-$(CHMOD) 755 $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.a),)
|
||||
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
|
||||
-$(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.dylib),)
|
||||
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
|
||||
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
|
||||
-$(CHMOD) 755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
endif
|
||||
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
|
||||
$(CP) libcryptopp.so $(DESTDIR)$(LIBDIR)
|
||||
-$(CHMOD) 755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(LN) -sf libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
|
||||
endif
|
||||
$(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
|
||||
-$(CP) *.h $(PREFIX)/include/cryptopp
|
||||
-$(CHMOD) 755 $(PREFIX)/include/cryptopp
|
||||
-$(CHMOD) 644 $(PREFIX)/include/cryptopp/*.h
|
||||
-$(CP) libcryptopp.a $(PREFIX)/lib
|
||||
-$(CHMOD) 644 $(PREFIX)/lib/libcryptopp.a
|
||||
-$(CP) cryptest.exe $(PREFIX)/bin
|
||||
-$(CHMOD) 755 $(PREFIX)/bin/cryptest.exe
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-$(CP) libcryptopp.dylib $(PREFIX)/lib
|
||||
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.dylib
|
||||
else
|
||||
-$(CP) libcryptopp.so $(PREFIX)/lib
|
||||
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.so
|
||||
endif
|
||||
|
||||
.PHONY: remove uninstall
|
||||
remove uninstall:
|
||||
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
ifneq ($(IS_IOS),0)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
-$(RM) -r $(PREFIX)/include/cryptopp
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.a
|
||||
-$(RM) $(PREFIX)/bin/cryptest.exe
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.dylib
|
||||
else
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so
|
||||
endif
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.so
|
||||
endif
|
||||
|
||||
libcryptopp.a: $(LIBOBJS)
|
||||
libcryptopp.a: public_service | $(LIBOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
.PHONY: libcryptopp.so
|
||||
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
endif
|
||||
libcryptopp.so: public_service | $(LIBOBJS)
|
||||
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS)
|
||||
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(CXXFLAGS) -Wl,--exclude-libs,ALL $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so
|
||||
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
|
||||
endif
|
||||
|
||||
libcryptopp.dylib: $(LIBOBJS)
|
||||
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
|
||||
|
||||
cryptest.exe: libcryptopp.a $(TESTOBJS)
|
||||
cryptest.exe: public_service | libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
# Used to generate list of source files for Autotools, CMakeList and Android.mk
|
||||
.PHONY: sources
|
||||
sources:
|
||||
$(info Library sources: $(filter-out fipstest.cpp $(TESTSRCS),$(SRCS)))
|
||||
$(info )
|
||||
$(info Test sources: $(TESTSRCS))
|
||||
|
||||
adhoc.cpp: adhoc.cpp.proto
|
||||
ifeq ($(wildcard adhoc.cpp),)
|
||||
cp adhoc.cpp.proto adhoc.cpp
|
||||
@ -266,3 +162,25 @@ endif # Dependencies
|
||||
|
||||
GNUmakefile.deps:
|
||||
$(CXX) $(CXXFLAGS) -MM *.cpp > GNUmakefile.deps
|
||||
|
||||
# Warn of potential configurations issues. This will go away after 5.6.3
|
||||
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
|
||||
NO_INIT_PRIORITY := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_INIT_PRIORITY" config.h)
|
||||
COMPATIBILITY_562 := $(shell $(EGREP) -c "^[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562" config.h)
|
||||
.PHONY: public_service
|
||||
public_service:
|
||||
ifneq ($(UNALIGNED_ACCESS),0)
|
||||
$(info WARNING: CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined in config.h.)
|
||||
endif
|
||||
ifneq ($(NO_INIT_PRIORITY),0)
|
||||
$(info WARNING: CRYPTOPP_INIT_PRIORITY is not defined in config.h.)
|
||||
endif
|
||||
ifneq ($(COMPATIBILITY_562),0)
|
||||
$(info WARNING: CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 is defined in config.h.)
|
||||
endif
|
||||
ifneq (x$(UNALIGNED_ACCESS)$(NO_INIT_PRIORITY)$(COMPATIBILITY_562),x000)
|
||||
$(info WARNING: You should make these changes in config.h, and not CXXFLAGS.)
|
||||
$(info WARNING: You can 'mv config.recommend config.h', but it breaks versioning.)
|
||||
$(info WARNING: See http://cryptopp.com/wiki/config.h for more details.)
|
||||
$(info )
|
||||
endif
|
||||
|
||||
@ -1,185 +1,169 @@
|
||||
CONTENTS OF THIS FILE
|
||||
---------------------
|
||||
|
||||
* Introduction
|
||||
* Building the Library
|
||||
* Alternate Build Systems
|
||||
* Installing the Library
|
||||
* Makefile Targets
|
||||
* Dynamic Analysis
|
||||
* Acceptance Testing
|
||||
* Reporting problems
|
||||
|
||||
INTRODUCTION
|
||||
------------
|
||||
|
||||
Crypto++ Library is a free C++ class library of cryptographic algorithms and schemes. It was written and placed in public domain by Wei Dai. The library homepage is at http://www.cryptopp.com/. The latest library source code can be found at http://github.com/weidai11/cryptopp. For licensing and copyright information, please see License.txt.
|
||||
|
||||
These are general instructions for the BSDs, Linux, OS X, Solaris and Unix. The library uses a GNU makefile, which combines configuration and a non-anemic make. On BSD and Solaris you will likely have to use `gmake` to build the library. On Linux, OS X and Unix, the system's make should be OK. On Windows, Crypto++ provides Borland and Visual Studio solutions.
|
||||
|
||||
You should look through the GNUmakefile and config.h to ensure settings look reasonable before building. If you need compatibility with Crypto++ 5.6.2, then you can use `config.compat` in place of `config.h`. You are discouraged from using `config.compat` because it re-introduces undefined behavior that was cleared at Crypto++ 5.6.3.
|
||||
|
||||
Wiki pages are available for some platforms with specific build instructions. The wiki can be found at http://cryptopp.com/wiki/. The pages include Android, ARM, iOS and Solaris. Solaris users should visit the wiki for important information on compiling the library with different versions of SunCC and options, and information on improving library performance and features.
|
||||
|
||||
Crypto++ does not depend upon other tools or libraries. It does not use Autotools, does not use CMake, and does not use Boost. If you use an alternate build system, like Autotools or CMake, then see the warning below about CXXFLAGS and lack of -DNDEBUG. CMake is available in Master as a matter of convenience, but its not officially supported.
|
||||
|
||||
|
||||
BUILDING THE LIBRARY
|
||||
--------------------
|
||||
|
||||
In general, all you should have to do is open a terminal, and then:
|
||||
|
||||
make
|
||||
make test
|
||||
sudo make install
|
||||
|
||||
The command above builds the static library and cryptest.exe program. If you want to build the shared object, then issue:
|
||||
|
||||
make static dynamic cryptest.exe
|
||||
|
||||
Or:
|
||||
|
||||
make libcryptopp.a libcryptopp.so cryptest.exe
|
||||
|
||||
|
||||
If you would like to use a different compiler, the set CXX:
|
||||
|
||||
export CXX=/opt/intel/bin/icpc
|
||||
make
|
||||
|
||||
If you want to build using C++11, then:
|
||||
|
||||
make CXXFLAGS="-std=c++11"
|
||||
|
||||
Or:
|
||||
|
||||
CXXFLAGS="-std=c++11"
|
||||
make
|
||||
|
||||
LLVM's libc++ is also supported, so you can:
|
||||
|
||||
CXXFLAGS="-std=c++11 -stdlib=libc++"
|
||||
make
|
||||
|
||||
|
||||
ALTERNATE BUILD SYSTEMS
|
||||
-----------------------
|
||||
|
||||
The Crypto++ library is Make based and uses GNU Make by default. The makefile uses '-DNDEBUG -g2 -O2' CXXFLAGS by default. If you use an alternate build system, like Autotools or CMake, then ensure the build system includes '-DNDEBUG' for production or release builds. The Crypto++ library uses asserts for debugging and diagnostics during development; it does not rely on them to crash a program at runtime.
|
||||
|
||||
If an assert triggers in production software, then unprotected sensitive information could be egressed from the program to the filesystem or the platform's error reporting program, like Apport on Ubuntu or CrashReporter on Apple.
|
||||
|
||||
The makefile orders object files to help remediate problems associated with C++ static initialization order. The library does not use custom linker scripts. If you use an alternate build system, like Autotools or CMake, and collect source files into a list, then ensure these three are at the head of the list: 'cryptlib.cpp cpu.cpp integer.cpp <other sources>'. They should be linked in the same order: 'cryptlib.o cpu.o integer.o <other objects>'.
|
||||
|
||||
If your linker supports initialization attributes, like init_priority, then you can define CRYPTOPP_INIT_PRIORITY to control object initialization order. Set it to a value like 250. User programs can use CRYPTOPP_USER_PRIORITY to avoid conflicts with library values. Initialization attributes are more reliable than object file ordering, but its not ubiquitously supported by linkers.
|
||||
|
||||
The makefile links to the static version of the Crypto++ library to avoid binary planting and other LD_PRELOAD tricks. You should use the static version of the library in your programs to help avoid unwanted redirections.
|
||||
|
||||
INSTALLING THE LIBRARY
|
||||
----------------------
|
||||
|
||||
To install the library into a user selected directory, perform:
|
||||
|
||||
make install PREFIX=/usr/local
|
||||
|
||||
If you are going to run `make install PREFIX=/usr/local`, then you should build with '-DCRYPTOPP_DATA_DIR='\"$PREFIX/share/cryptopp/\"' to ensure cryptest.exe can locate the test data files and test vectors after installation. The trailing slash in the path is needed because simple preprocessor concatenation is used.
|
||||
|
||||
During install, the makefile copies cryptest.exe into $PREFIX/bin, copies headers into $PREFIX/include/cryptopp, and copies libraries into $PREFIX/lib. If you only built a static or dynamic version of the library, then only one library is copied. The install recipe does not fail if the static library or shared object is not built.
|
||||
|
||||
PREFIX is non-standard, but its retained for historical purposes. The makefile also responds to `prefix=<path>`.
|
||||
|
||||
|
||||
MAKEFILE TARGETS
|
||||
----------------
|
||||
|
||||
The following are some of the targets provided by the GNU makefile.
|
||||
|
||||
`make` invokes the default rule, which builds the Crypto++ static library and test harness. They are called `libcryptopp.a` and `cryptest.exe`, respectively. `cryptest.exe` links against `libcryptopp.a`, so the static library is a prerequisite for the target.
|
||||
|
||||
`make libcryptopp.a` and `make static` build the static version of the library.
|
||||
|
||||
`make libcryptopp.so` and `make dynamic` build the dynamic version of the library. On Mac OS X, the recipe builds `libcryptopp.dylib` instead.
|
||||
|
||||
`make cryptest.exe` builds the library test harness.
|
||||
|
||||
`make test` and `make check` are the same recipe and invoke the test harness with the the validation option. That is, it executes `cryptest.exe v`.
|
||||
|
||||
`make install` installs the library. By default, the makefile copies into `/usr/local` by default.
|
||||
|
||||
`make clean` cleans most transient and temporary objects.
|
||||
|
||||
`make disclean` cleans most objects that are not part of the original distribution.
|
||||
|
||||
`make dist` and `make zip` builds ZIP file that is suitable for distribution.
|
||||
|
||||
`make iso` builds an ISO on Linux or OS X that is suitable for alternate distribution.
|
||||
|
||||
`make ubsan` and `make asan` builds the library with the respective sanitizer.
|
||||
|
||||
|
||||
DYNAMIC ANALYSIS
|
||||
----------------
|
||||
|
||||
The Crypto++ embraces tools like Undefined Behavior sanitizer (UBsan), Address sanitizer (Asan) and Valgrind. Both Clang 3.2 and above and GCC 4.8 and above provide sanitizers. Please check with your distribution on how to install the compiler with its sanitizer libraries (they are sometimes a separate install item).
|
||||
|
||||
UBsan and Asan are mutually exclusive options, so you can perform only one of these at a time:
|
||||
|
||||
make ubsan
|
||||
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
|
||||
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
|
||||
|
||||
Or:
|
||||
|
||||
make asan
|
||||
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
|
||||
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
|
||||
|
||||
If you experience self test failures or see reports of undefined behavior, then you should ensure CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is defined in config.h. CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined due to historical purposes.
|
||||
|
||||
If you experience failures under Asan, then gather more information with:
|
||||
|
||||
./cryptest.exe v 2>&1 | asan_symbolize
|
||||
|
||||
If you moved Crypto++ such that the paths have changed, then perform:
|
||||
|
||||
./cryptest.exe v 2>&1 | sed "s/<old path>/<new path>/g" | asan_symbolize
|
||||
|
||||
|
||||
ACCEPTANCE TESTING
|
||||
------------------
|
||||
|
||||
Crypto++ uses five security gates in its engineering process. The library must maintain the quality provided by the review system and integrity of the test suites. You can use the information to decide if the Crypto++ library suits your needs and provides a compatible security posture.
|
||||
|
||||
The first gate is code review and discussion of proposed patches. Git commits often cross reference a User Group discussions.
|
||||
|
||||
Second is the compiler warning system. The code must clean compile under the equivalent of GCC's -Wall -Wextra (modulo -Wno-type-limits -Wno-unknown-pragmas). This is a moving target as compiler analysis improves.
|
||||
|
||||
Third, the code must pass cleanly though GCC and Clang's Undefined Behavior sanitizer (UBsan) and Address sanitizer (Asan) with CRYPTOPP_NO_UNALIGNED_DATA_ACCESS defined in config.h. See DYNAMIC ANALYSIS above on how to execute them.
|
||||
|
||||
Fourth, the test harness provides a "validation" option which performs basic system checks (like endianess and word sizes) and exercises algorithms (like AES and SHA). You run the validation suite as shown below. The tail of the output should indicate 0 failed tests.
|
||||
|
||||
./cryptest.exe v
|
||||
...
|
||||
|
||||
All tests passed!
|
||||
Test ended at Sun Jul 26 02:10:57 2015
|
||||
Seed used was: 1437891055
|
||||
|
||||
Fifth, the test harness provides a "test vector" option which uses many known test vectors, even those published by other people (like Brian Gladman for AES). You run the test vectors as shown below. The tail of the output should indicate 0 failed tests.
|
||||
|
||||
./cryptest.exe tv all
|
||||
...
|
||||
|
||||
Testing SymmetricCipher algorithm MARS/ECB.
|
||||
.................
|
||||
Tests complete. Total tests = 4094. Failed tests = 0.
|
||||
|
||||
The library also offers its test script for those who want to use it. The test script is names cryptest.sh, and it repeatedly builds the library and exectues the tests under various configurations. It takes 2 to 4 hours to run on a semi-modern desktop or server; and days to run on an IoT gadget. Also see http://github.com/weidai11/cryptopp/blob/master/cryptest.sh and http://cryptopp.com/wiki/Cryptest.sh.
|
||||
|
||||
|
||||
REPORTING PROBLEMS
|
||||
------------------
|
||||
|
||||
Dirty compiles and failures in the validation suite or test vectors should be reported at the Crypto++ User Group. The User Group is located at http://groups.google.com/forum/#!forum/cryptopp-users.
|
||||
|
||||
Also see http://www.cryptopp.com/wiki/Bug_Report.
|
||||
CONTENTS OF THIS FILE
|
||||
---------------------
|
||||
|
||||
* Introduction
|
||||
* Building the Library
|
||||
* Installing the Library
|
||||
* Makefile Targets
|
||||
* DataDir Patch
|
||||
* Dynamic Analysis
|
||||
* Acceptance Testing
|
||||
* Reporting problems
|
||||
|
||||
INTRODUCTION
|
||||
------------
|
||||
|
||||
Crypto++ Library is a free C++ class library of cryptographic algorithms and schemes. It was written and placed in public domain by Wei Dai. The library homepage is at http://www.cryptopp.com/. The latest library source code can be found at https://github.com/weidai11/cryptopp. For licensing and copyright information, please see License.txt.
|
||||
|
||||
These are general instructions for the BSDs, Linux, OS X, Solaris and Unix. On BSD you will likely have to use `gmake` to build the library. On Linux, OS X, Solaris and Unix, the system's make should be OK. On Windows, Crypto++ provides Borland and Visual Studio solutions.
|
||||
|
||||
Crypto++ uses a GNU makefile, which combines configuration and a non-anemic make. You should look through the GNUmakefile and config.h to ensure settings look reasonable before building. Please pay particular attention to CRYPTOPP_NO_UNALIGNED_DATA_ACCESS in config.h.
|
||||
|
||||
Crypto++ does not depend upon other tools or libraries. It does not use Autotools, does not use Cmake, and does not use Boost.
|
||||
|
||||
|
||||
BUILDING THE LIBRARY
|
||||
--------------------
|
||||
|
||||
In general, all you should have to do is open a terminal, and then:
|
||||
|
||||
make
|
||||
make test
|
||||
sudo make install
|
||||
|
||||
The command above builds the static library and cryptest.exe program. If you want to build the shared object, then issue:
|
||||
|
||||
make static dynamic cryptest.exe
|
||||
|
||||
Or:
|
||||
|
||||
make libcryptopp.a libcryptopp.so cryptest.exe
|
||||
|
||||
|
||||
If you would like to use a different compiler, the set CXX:
|
||||
|
||||
export CXX=/opt/intel/bin/icpc
|
||||
make
|
||||
|
||||
If you want to build using C++11, then:
|
||||
|
||||
make CXXFLAGS="-std=c++11"
|
||||
|
||||
Or:
|
||||
|
||||
CXXFLAGS="-std=c++11"
|
||||
make
|
||||
|
||||
LLVM's libc++ is also supported, so you can:
|
||||
|
||||
CXXFLAGS="-std=c++11 -stdlib=libc++"
|
||||
make
|
||||
|
||||
|
||||
INSTALLING THE LIBRARY
|
||||
----------------------
|
||||
|
||||
To install the library into a user selected directory, perform:
|
||||
|
||||
make install PREFIX=/usr/local
|
||||
|
||||
During install, the makefile copies cryptest.exe into $PREFIX/bin, copies headers into $PREFIX/include/cryptopp, and copies libraries into $PREFIX/lib. If you only built a static or dynamic version of the library, then only one library is copied. The install recipe does not fail if the static library or shared object is not built.
|
||||
|
||||
PREFIX is non-standard, but its retained for historical purposes. The makefile also responds to `prefix=<path>`.
|
||||
|
||||
There are some open issues installing the library because cryptest.exe is not sympathetic to path changes of of its test vectors and test data. See the DataDir patch below to fix it.
|
||||
|
||||
|
||||
MAKEFILE TARGETS
|
||||
----------------
|
||||
|
||||
The following are some of the targets provided by the GNU makefile.
|
||||
|
||||
`make` invokes the default rule, which builds the Crypto++ static library and test harness. They are called `libcryptopp.a` and `cryptest.exe`, respectively. `cryptest.exe` links against `libcryptopp.a`, so the static library is a prerequisite for the target.
|
||||
|
||||
`make libcryptopp.a` and `make static` build the static version of the library.
|
||||
|
||||
`make libcryptopp.so` and `make dynamic` build the dynamic version of the library. On Mac OS X, the recipe builds `libcryptopp.dylib` instead.
|
||||
|
||||
`make cryptest.exe` builds the library test harness.
|
||||
|
||||
`make test` and `make check` are the same recipe and invoke the test harness with the the validation option. That is, it executes `cryptest.exe v`.
|
||||
|
||||
`make install` installs the library. By default, the makefile copies into `/usr`. On OpenBSD, `make install` uses `/usr/local` by default because C++ headers should not be placed with the system headers.
|
||||
|
||||
`make clean` cleans most transient and temporary objects.
|
||||
|
||||
`make disclean` cleans most objects that are not part of the original distribution.
|
||||
|
||||
`make dist` and `make zip` build s ZIP file that is suitable for distribution.
|
||||
|
||||
|
||||
DATADIR PATCH
|
||||
-------------
|
||||
|
||||
The library offers a DataDir patch to help with post-installation issues regarding the location of the test vectors and test data. Its a patch provided by the community, so it must be applied manually. To acquire the patch, see http://www.cryptopp.com/wiki/DataDir.
|
||||
|
||||
|
||||
DYNAMIC ANALYSIS
|
||||
----------------
|
||||
|
||||
The Crypto++ embraces tools like Undefined Behavior sanitizer (UBsan), Address sanitizer (Asan) and Valgrind. Both Clang 3.2 and above and GCC 4.8 and above provide sanitizers. Please check with your distribution on how to install the compiler with its sanitizer libraries (they are sometimes a separate install item).
|
||||
|
||||
UBsan and Asan are mutually exclusive options, so you can perform only one of these at a time:
|
||||
|
||||
make ubsan
|
||||
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
|
||||
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
|
||||
|
||||
Or:
|
||||
|
||||
make asan
|
||||
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
|
||||
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
|
||||
|
||||
If you experience self test failures or see reports of undefined behavior, then you should ensure CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is defined in config.h. CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined due to historical purposes.
|
||||
|
||||
If you experience failures under Asan, then gather more information with:
|
||||
|
||||
./cryptest.exe v 2>&1 | asan_symbolize
|
||||
|
||||
If you moved Crypto++ such that the paths have changed, then perform:
|
||||
|
||||
./cryptest.exe v 2>&1 | sed "s/<old path>/<new path>/g" | asan_symbolize
|
||||
|
||||
|
||||
ACCEPTANCE TESTING
|
||||
------------------
|
||||
|
||||
Crypto++ uses five security gates in its engineering process. The library must maintain the quality provided by the review system and integrity of the test suites. You can use the information to decide if the Crypto++ library suits your needs and provides a compatible security posture.
|
||||
|
||||
The first gate is code review and discussion of proposed patches. Git commits often cross reference a User Group discussions.
|
||||
|
||||
Second is the compiler warning system. The code must clean compile under the equivalent of GCC's -Wall -Wextra (modulo -Wno-type-limits -Wno-unknown-pragmas). This is a moving target as compiler analysis improves.
|
||||
|
||||
Third, the code must pass cleanly though GCC and Clang's Undefined Behavior sanitizer (UBsan) and Address sanitizer (Asan) with CRYPTOPP_NO_UNALIGNED_DATA_ACCESS defined in config.h. See DYNAMIC ANALYSIS above on how to execute them.
|
||||
|
||||
Fourth, the test harness provides a "validation" option which performs basic system checks (like endianess and word sizes) and exercises algorithms (like AES and SHA). You run the validation suite as shown below. The tail of the output should indicate 0 failed tests.
|
||||
|
||||
./cryptest.exe v
|
||||
...
|
||||
|
||||
All tests passed!
|
||||
Test ended at Sun Jul 26 02:10:57 2015
|
||||
Seed used was: 1437891055
|
||||
|
||||
Fifth, the test harness provides a "test vector" option which uses many known test vectors, even those published by other people (like Brian Gladman for AES). You run the test vectors as shown below. The tail of the output should indicate 0 failed tests.
|
||||
|
||||
./cryptest.exe tv all
|
||||
...
|
||||
|
||||
Testing SymmetricCipher algorithm MARS/ECB.
|
||||
.................
|
||||
Tests complete. Total tests = 4094. Failed tests = 0.
|
||||
|
||||
REPORTING PROBLEMS
|
||||
------------------
|
||||
|
||||
Dirty compiles and failures in the validation suite or test vectors should be reported at the Crypto++ User Group. The User Group is located at https://groups.google.com/forum/#!forum/cryptopp-users.
|
||||
|
||||
Also see http://www.cryptopp.com/wiki/Bug_Report.
|
||||
|
||||
@ -1,51 +1,51 @@
|
||||
Compilation Copyright (c) 1995-2016 by Wei Dai. All rights reserved.
|
||||
This copyright applies only to this software distribution package
|
||||
as a compilation, and does not imply a copyright on any particular
|
||||
file in the package.
|
||||
|
||||
All individual files in this compilation are placed in the public domain by
|
||||
Wei Dai and other contributors.
|
||||
|
||||
I would like to thank the following authors for placing their works into
|
||||
the public domain:
|
||||
|
||||
Joan Daemen - 3way.cpp
|
||||
Leonard Janke - cast.cpp, seal.cpp
|
||||
Steve Reid - cast.cpp
|
||||
Phil Karn - des.cpp
|
||||
Andrew M. Kuchling - md2.cpp, md4.cpp
|
||||
Colin Plumb - md5.cpp
|
||||
Seal Woods - rc6.cpp
|
||||
Chris Morgan - rijndael.cpp
|
||||
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
|
||||
Richard De Moliner - safer.cpp
|
||||
Matthew Skala - twofish.cpp
|
||||
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
|
||||
Ronny Van Keer - sha3.cpp
|
||||
|
||||
The Crypto++ Library (as a compilation) is currently licensed under the Boost
|
||||
Software License 1.0 (http://www.boost.org/users/license.html).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
Compilation Copyright (c) 1995-2013 by Wei Dai. All rights reserved.
|
||||
This copyright applies only to this software distribution package
|
||||
as a compilation, and does not imply a copyright on any particular
|
||||
file in the package.
|
||||
|
||||
All individual files in this compilation are placed in the public domain by
|
||||
Wei Dai and other contributors.
|
||||
|
||||
I would like to thank the following authors for placing their works into
|
||||
the public domain:
|
||||
|
||||
Joan Daemen - 3way.cpp
|
||||
Leonard Janke - cast.cpp, seal.cpp
|
||||
Steve Reid - cast.cpp
|
||||
Phil Karn - des.cpp
|
||||
Andrew M. Kuchling - md2.cpp, md4.cpp
|
||||
Colin Plumb - md5.cpp
|
||||
Seal Woods - rc6.cpp
|
||||
Chris Morgan - rijndael.cpp
|
||||
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
|
||||
Richard De Moliner - safer.cpp
|
||||
Matthew Skala - twofish.cpp
|
||||
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
|
||||
Ronny Van Keer - sha3.cpp
|
||||
|
||||
The Crypto++ Library (as a compilation) is currently licensed under the Boost
|
||||
Software License 1.0 (http://www.boost.org/users/license.html).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
File diff suppressed because it is too large
Load Diff
3
Common/3dParty/cryptopp/TestData/3desval.dat
Normal file
3
Common/3dParty/cryptopp/TestData/3desval.dat
Normal file
@ -0,0 +1,3 @@
|
||||
0123456789abcdeffedcba9876543210 0123456789abcde7 7f1d0a77826b8aff
|
||||
0123456789abcdeffedcba987654321089abcdef01234567 0123456789abcde7 de0b7c06ae5e0ed5
|
||||
0123456789ABCDEF01010101010101011011121314151617 94DBE082549A14EF 9011121314151617
|
||||
5
Common/3dParty/cryptopp/TestData/3wayval.dat
Normal file
5
Common/3dParty/cryptopp/TestData/3wayval.dat
Normal file
@ -0,0 +1,5 @@
|
||||
000000000000000000000000 000000010000000100000001 4059c76e83ae9dc4ad21ecf7
|
||||
000000060000000500000004 000000030000000200000001 d2f05b5ed6144138cab920cd
|
||||
def01234456789abbcdef012 234567899abcdef001234567 0aa55dbb9cdddb6d7cdb76b2
|
||||
d2f05b5ed6144138cab920cd 4059c76e83ae9dc4ad21ecf7 478ea8716b13f17c15b155ed
|
||||
|
||||
45
Common/3dParty/cryptopp/TestData/camellia.dat
Normal file
45
Common/3dParty/cryptopp/TestData/camellia.dat
Normal file
@ -0,0 +1,45 @@
|
||||
0123456789ABCDEFFEDCBA9876543210 0123456789ABCDEFFEDCBA9876543210 67673138549669730857065648EABE43
|
||||
80000000000000000000000000000000 00000000000000000000000000000000 6C227F749319A3AA7DA235A9BBA05A2C
|
||||
00000000000000000000000000000001 00000000000000000000000000000000 41E0E6DC2DDEC65D8B8120E60977B82D
|
||||
00000000000000000000000000000000 80000000000000000000000000000000 07923A39EB0A817D1C4D87BDB82D1F1C
|
||||
00000000000000000000000000000000 00000000000000000000000000000001 F5574ACC3148DFCB9015200631024DF9
|
||||
00000000000000000000000000000000 00000000000000000000000000000000 3D028025B156327C17F762C1F2CBCA71
|
||||
01010101010101010101010101010101 01010101010101010101010101010101 637084CB1120D6F25DB618893040AA27
|
||||
02020202020202020202020202020202 02020202020202020202020202020202 612834AAC9EF906BAEAA076E1C75179D
|
||||
04040404040404040404040404040404 04040404040404040404040404040404 B24FAF8A579E4EFE986571FB2F68B5B4
|
||||
08080808080808080808080808080808 08080808080808080808080808080808 3E5CAFBB70545AABB1109293A1C44C14
|
||||
10101010101010101010101010101010 10101010101010101010101010101010 E1FA5FD3F40B766BBE3DF469AF41B420
|
||||
20202020202020202020202020202020 20202020202020202020202020202020 7E724027BB2F591C63254D936FCC4B43
|
||||
40404040404040404040404040404040 40404040404040404040404040404040 538ADCBE104A3483B3C2A3D8CE72FBD6
|
||||
80808080808080808080808080808080 80808080808080808080808080808080 AA7627F70F6B54C217C3EF232D362459
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 25DD9EB9DD67FBC6E8431F56F4FBE651
|
||||
0123456789ABCDEFFEDCBA98765432100011223344556677 0123456789ABCDEFFEDCBA9876543210 B4993401B3E996F84EE5CEE7D79B09B9
|
||||
800000000000000000000000000000000000000000000000 00000000000000000000000000000000 1B6220D365C2176C1D41A5826520FCA1
|
||||
000000000000000000000000000000000000000000000001 00000000000000000000000000000000 E37577F71E0E643C4D3F55219ABA1394
|
||||
000000000000000000000000000000000000000000000000 80000000000000000000000000000000 3EB6CC5618EFC98455B5992050D474E7
|
||||
000000000000000000000000000000000000000000000000 00000000000000000000000000000001 BA9AE89FDDCE4B51131E17C4D65CE587
|
||||
000000000000000000000000000000000000000000000000 00000000000000000000000000000000 56E1E129CA5C02C7F9AC6AFDEF86ADC3
|
||||
010101010101010101010101010101010101010101010101 01010101010101010101010101010101 8F764397C10BE84BA876CEEFA4225BFF
|
||||
020202020202020202020202020202020202020202020202 02020202020202020202020202020202 60B00674BFD444D07B5A19851E6151CD
|
||||
040404040404040404040404040404040404040404040404 04040404040404040404040404040404 81B26FF4F6B4377CC555873504B3A38B
|
||||
080808080808080808080808080808080808080808080808 08080808080808080808080808080808 A2AA1C6693DC2B70D75C9B39B9B214D0
|
||||
101010101010101010101010101010101010101010101010 10101010101010101010101010101010 A907BFDAEEF8C81D05855235E8D3BE08
|
||||
202020202020202020202020202020202020202020202020 20202020202020202020202020202020 87F8EA30332036F17CEAC0097CE33BC1
|
||||
404040404040404040404040404040404040404040404040 40404040404040404040404040404040 A2C32EA499E41A248565253BACC11E3B
|
||||
808080808080808080808080808080808080808080808080 80808080808080808080808080808080 F602BA7F515B082983B8F7A27F92408F
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 3F8D5676F51CE23DC3BDB627F8B3883E
|
||||
0123456789ABCDEFFEDCBA987654321000112233445566778899AABBCCDDEEFF 0123456789ABCDEFFEDCBA9876543210 9ACC237DFF16D76C20EF7C919E3A7509
|
||||
8000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 2136FABDA091DFB5171B94B8EFBB5D08
|
||||
0000000000000000000000000000000000000000000000000000000000000001 00000000000000000000000000000000 AFCD38B195E0A736304E89B9AE3019D3
|
||||
0000000000000000000000000000000000000000000000000000000000000000 80000000000000000000000000000000 B0C6B88AEA518AB09E847248E91B1B9D
|
||||
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000001 9CDB269B5D293BC5DB9C55B057D9B591
|
||||
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 396154111ADEFC500CF6E5C99038BC17
|
||||
0101010101010101010101010101010101010101010101010101010101010101 01010101010101010101010101010101 438D0C2E7E86869B56EBA23B66086A01
|
||||
0202020202020202020202020202020202020202020202020202020202020202 02020202020202020202020202020202 D4F553BFA794F55EF3B7A578629F6DEA
|
||||
0404040404040404040404040404040404040404040404040404040404040404 04040404040404040404040404040404 5E858730ABC9823A93CA4CAB67F0B423
|
||||
0808080808080808080808080808080808080808080808080808080808080808 08080808080808080808080808080808 F9A9C1540AE1B314DBEDF9A49054DC9D
|
||||
1010101010101010101010101010101010101010101010101010101010101010 10101010101010101010101010101010 6693FC130669F194F81E8D175194DDA2
|
||||
2020202020202020202020202020202020202020202020202020202020202020 20202020202020202020202020202020 F3E1FDA6B9C8314799F4654C29F1C690
|
||||
4040404040404040404040404040404040404040404040404040404040404040 40404040404040404040404040404040 4A30476F1141FBF303ED63FCD3CB0536
|
||||
8080808080808080808080808080808080808080808080808080808080808080 80808080808080808080808080808080 0C765AA494E048FC8BB23139F2124CB6
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 4F05F28CA23EEAE205B67B1C95CD5280
|
||||
11
Common/3dParty/cryptopp/TestData/cast128v.dat
Normal file
11
Common/3dParty/cryptopp/TestData/cast128v.dat
Normal file
@ -0,0 +1,11 @@
|
||||
01 23 45 67 12 34 56 78 23 45 67 89 34 56 78 9A
|
||||
01 23 45 67 89 AB CD EF
|
||||
23 8B 4F E5 84 7E 44 B2
|
||||
|
||||
01 23 45 67 12 34 56 78 23 45
|
||||
01 23 45 67 89 AB CD EF
|
||||
EB 6A 71 1A 2C 02 27 1B
|
||||
|
||||
01 23 45 67 12
|
||||
01 23 45 67 89 AB CD EF
|
||||
7A C8 16 D1 6E 9B 30 2E
|
||||
11
Common/3dParty/cryptopp/TestData/cast256v.dat
Normal file
11
Common/3dParty/cryptopp/TestData/cast256v.dat
Normal file
@ -0,0 +1,11 @@
|
||||
2342bb9efa38542c0af75647f29f615d
|
||||
00000000000000000000000000000000
|
||||
c842a08972b43d20836c91d1b7530f6b
|
||||
|
||||
2342bb9efa38542cbed0ac83940ac298bac77a7717942863
|
||||
00000000000000000000000000000000
|
||||
1b386c0210dcadcbdd0e41aa08a7a7e8
|
||||
|
||||
2342bb9efa38542cbed0ac83940ac2988d7c47ce264908461cc1b5137ae6b604
|
||||
00000000000000000000000000000000
|
||||
4f6a2038286897b9c9870136553317fa
|
||||
171
Common/3dParty/cryptopp/TestData/descert.dat
Normal file
171
Common/3dParty/cryptopp/TestData/descert.dat
Normal file
@ -0,0 +1,171 @@
|
||||
0101010101010101 95F8A5E5DD31D900 8000000000000000
|
||||
0101010101010101 DD7F121CA5015619 4000000000000000
|
||||
0101010101010101 2E8653104F3834EA 2000000000000000
|
||||
0101010101010101 4BD388FF6CD81D4F 1000000000000000
|
||||
0101010101010101 20B9E767B2FB1456 0800000000000000
|
||||
0101010101010101 55579380D77138EF 0400000000000000
|
||||
0101010101010101 6CC5DEFAAF04512F 0200000000000000
|
||||
0101010101010101 0D9F279BA5D87260 0100000000000000
|
||||
0101010101010101 D9031B0271BD5A0A 0080000000000000
|
||||
0101010101010101 424250B37C3DD951 0040000000000000
|
||||
0101010101010101 B8061B7ECD9A21E5 0020000000000000
|
||||
0101010101010101 F15D0F286B65BD28 0010000000000000
|
||||
0101010101010101 ADD0CC8D6E5DEBA1 0008000000000000
|
||||
0101010101010101 E6D5F82752AD63D1 0004000000000000
|
||||
0101010101010101 ECBFE3BD3F591A5E 0002000000000000
|
||||
0101010101010101 F356834379D165CD 0001000000000000
|
||||
0101010101010101 2B9F982F20037FA9 0000800000000000
|
||||
0101010101010101 889DE068A16F0BE6 0000400000000000
|
||||
0101010101010101 E19E275D846A1298 0000200000000000
|
||||
0101010101010101 329A8ED523D71AEC 0000100000000000
|
||||
0101010101010101 E7FCE22557D23C97 0000080000000000
|
||||
0101010101010101 12A9F5817FF2D65D 0000040000000000
|
||||
0101010101010101 A484C3AD38DC9C19 0000020000000000
|
||||
0101010101010101 FBE00A8A1EF8AD72 0000010000000000
|
||||
0101010101010101 750D079407521363 0000008000000000
|
||||
0101010101010101 64FEED9C724C2FAF 0000004000000000
|
||||
0101010101010101 F02B263B328E2B60 0000002000000000
|
||||
0101010101010101 9D64555A9A10B852 0000001000000000
|
||||
0101010101010101 D106FF0BED5255D7 0000000800000000
|
||||
0101010101010101 E1652C6B138C64A5 0000000400000000
|
||||
0101010101010101 E428581186EC8F46 0000000200000000
|
||||
0101010101010101 AEB5F5EDE22D1A36 0000000100000000
|
||||
0101010101010101 E943D7568AEC0C5C 0000000080000000
|
||||
0101010101010101 DF98C8276F54B04B 0000000040000000
|
||||
0101010101010101 B160E4680F6C696F 0000000020000000
|
||||
0101010101010101 FA0752B07D9C4AB8 0000000010000000
|
||||
0101010101010101 CA3A2B036DBC8502 0000000008000000
|
||||
0101010101010101 5E0905517BB59BCF 0000000004000000
|
||||
0101010101010101 814EEB3B91D90726 0000000002000000
|
||||
0101010101010101 4D49DB1532919C9F 0000000001000000
|
||||
0101010101010101 25EB5FC3F8CF0621 0000000000800000
|
||||
0101010101010101 AB6A20C0620D1C6F 0000000000400000
|
||||
0101010101010101 79E90DBC98F92CCA 0000000000200000
|
||||
0101010101010101 866ECEDD8072BB0E 0000000000100000
|
||||
0101010101010101 8B54536F2F3E64A8 0000000000080000
|
||||
0101010101010101 EA51D3975595B86B 0000000000040000
|
||||
0101010101010101 CAFFC6AC4542DE31 0000000000020000
|
||||
0101010101010101 8DD45A2DDF90796C 0000000000010000
|
||||
0101010101010101 1029D55E880EC2D0 0000000000008000
|
||||
0101010101010101 5D86CB23639DBEA9 0000000000004000
|
||||
0101010101010101 1D1CA853AE7C0C5F 0000000000002000
|
||||
0101010101010101 CE332329248F3228 0000000000001000
|
||||
0101010101010101 8405D1ABE24FB942 0000000000000800
|
||||
0101010101010101 E643D78090CA4207 0000000000000400
|
||||
0101010101010101 48221B9937748A23 0000000000000200
|
||||
0101010101010101 DD7C0BBD61FAFD54 0000000000000100
|
||||
0101010101010101 2FBC291A570DB5C4 0000000000000080
|
||||
0101010101010101 E07C30D7E4E26E12 0000000000000040
|
||||
0101010101010101 0953E2258E8E90A1 0000000000000020
|
||||
0101010101010101 5B711BC4CEEBF2EE 0000000000000010
|
||||
0101010101010101 CC083F1E6D9E85F6 0000000000000008
|
||||
0101010101010101 D2FD8867D50D2DFE 0000000000000004
|
||||
0101010101010101 06E7EA22CE92708F 0000000000000002
|
||||
0101010101010101 166B40B44ABA4BD6 0000000000000001
|
||||
8001010101010101 0000000000000000 95A8D72813DAA94D
|
||||
4001010101010101 0000000000000000 0EEC1487DD8C26D5
|
||||
2001010101010101 0000000000000000 7AD16FFB79C45926
|
||||
1001010101010101 0000000000000000 D3746294CA6A6CF3
|
||||
0801010101010101 0000000000000000 809F5F873C1FD761
|
||||
0401010101010101 0000000000000000 C02FAFFEC989D1FC
|
||||
0201010101010101 0000000000000000 4615AA1D33E72F10
|
||||
0180010101010101 0000000000000000 2055123350C00858
|
||||
0140010101010101 0000000000000000 DF3B99D6577397C8
|
||||
0120010101010101 0000000000000000 31FE17369B5288C9
|
||||
0110010101010101 0000000000000000 DFDD3CC64DAE1642
|
||||
0108010101010101 0000000000000000 178C83CE2B399D94
|
||||
0104010101010101 0000000000000000 50F636324A9B7F80
|
||||
0102010101010101 0000000000000000 A8468EE3BC18F06D
|
||||
0101800101010101 0000000000000000 A2DC9E92FD3CDE92
|
||||
0101400101010101 0000000000000000 CAC09F797D031287
|
||||
0101200101010101 0000000000000000 90BA680B22AEB525
|
||||
0101100101010101 0000000000000000 CE7A24F350E280B6
|
||||
0101080101010101 0000000000000000 882BFF0AA01A0B87
|
||||
0101040101010101 0000000000000000 25610288924511C2
|
||||
0101020101010101 0000000000000000 C71516C29C75D170
|
||||
0101018001010101 0000000000000000 5199C29A52C9F059
|
||||
0101014001010101 0000000000000000 C22F0A294A71F29F
|
||||
0101012001010101 0000000000000000 EE371483714C02EA
|
||||
0101011001010101 0000000000000000 A81FBD448F9E522F
|
||||
0101010801010101 0000000000000000 4F644C92E192DFED
|
||||
0101010401010101 0000000000000000 1AFA9A66A6DF92AE
|
||||
0101010201010101 0000000000000000 B3C1CC715CB879D8
|
||||
0101010180010101 0000000000000000 19D032E64AB0BD8B
|
||||
0101010140010101 0000000000000000 3CFAA7A7DC8720DC
|
||||
0101010120010101 0000000000000000 B7265F7F447AC6F3
|
||||
0101010110010101 0000000000000000 9DB73B3C0D163F54
|
||||
0101010108010101 0000000000000000 8181B65BABF4A975
|
||||
0101010104010101 0000000000000000 93C9B64042EAA240
|
||||
0101010102010101 0000000000000000 5570530829705592
|
||||
0101010101800101 0000000000000000 8638809E878787A0
|
||||
0101010101400101 0000000000000000 41B9A79AF79AC208
|
||||
0101010101200101 0000000000000000 7A9BE42F2009A892
|
||||
0101010101100101 0000000000000000 29038D56BA6D2745
|
||||
0101010101080101 0000000000000000 5495C6ABF1E5DF51
|
||||
0101010101040101 0000000000000000 AE13DBD561488933
|
||||
0101010101020101 0000000000000000 024D1FFA8904E389
|
||||
0101010101018001 0000000000000000 D1399712F99BF02E
|
||||
0101010101014001 0000000000000000 14C1D7C1CFFEC79E
|
||||
0101010101012001 0000000000000000 1DE5279DAE3BED6F
|
||||
0101010101011001 0000000000000000 E941A33F85501303
|
||||
0101010101010801 0000000000000000 DA99DBBC9A03F379
|
||||
0101010101010401 0000000000000000 B7FC92F91D8E92E9
|
||||
0101010101010201 0000000000000000 AE8E5CAA3CA04E85
|
||||
0101010101010180 0000000000000000 9CC62DF43B6EED74
|
||||
0101010101010140 0000000000000000 D863DBB5C59A91A0
|
||||
0101010101010120 0000000000000000 A1AB2190545B91D7
|
||||
0101010101010110 0000000000000000 0875041E64C570F7
|
||||
0101010101010108 0000000000000000 5A594528BEBEF1CC
|
||||
0101010101010104 0000000000000000 FCDB3291DE21F0C0
|
||||
0101010101010102 0000000000000000 869EFD7F9F265A09
|
||||
1046913489980131 0000000000000000 88D55E54F54C97B4
|
||||
1007103489988020 0000000000000000 0C0CC00C83EA48FD
|
||||
10071034C8980120 0000000000000000 83BC8EF3A6570183
|
||||
1046103489988020 0000000000000000 DF725DCAD94EA2E9
|
||||
1086911519190101 0000000000000000 E652B53B550BE8B0
|
||||
1086911519580101 0000000000000000 AF527120C485CBB0
|
||||
5107B01519580101 0000000000000000 0F04CE393DB926D5
|
||||
1007B01519190101 0000000000000000 C9F00FFC74079067
|
||||
3107915498080101 0000000000000000 7CFD82A593252B4E
|
||||
3107919498080101 0000000000000000 CB49A2F9E91363E3
|
||||
10079115B9080140 0000000000000000 00B588BE70D23F56
|
||||
3107911598090140 0000000000000000 406A9A6AB43399AE
|
||||
1007D01589980101 0000000000000000 6CB773611DCA9ADA
|
||||
9107911589980101 0000000000000000 67FD21C17DBB5D70
|
||||
9107D01589190101 0000000000000000 9592CB4110430787
|
||||
1007D01598980120 0000000000000000 A6B7FF68A318DDD3
|
||||
1007940498190101 0000000000000000 4D102196C914CA16
|
||||
0107910491190401 0000000000000000 2DFA9F4573594965
|
||||
0107910491190101 0000000000000000 B46604816C0E0774
|
||||
0107940491190401 0000000000000000 6E7E6221A4F34E87
|
||||
19079210981A0101 0000000000000000 AA85E74643233199
|
||||
1007911998190801 0000000000000000 2E5A19DB4D1962D6
|
||||
10079119981A0801 0000000000000000 23A866A809D30894
|
||||
1007921098190101 0000000000000000 D812D961F017D320
|
||||
100791159819010B 0000000000000000 055605816E58608F
|
||||
1004801598190101 0000000000000000 ABD88E8B1B7716F1
|
||||
1004801598190102 0000000000000000 537AC95BE69DA1E1
|
||||
1004801598190108 0000000000000000 AED0F6AE3C25CDD8
|
||||
1002911598100104 0000000000000000 B3E35A5EE53E7B8D
|
||||
1002911598190104 0000000000000000 61C79C71921A2EF8
|
||||
1002911598100201 0000000000000000 E2F5728F0995013C
|
||||
1002911698100101 0000000000000000 1AEAC39A61F0A464
|
||||
7CA110454A1A6E57 01A1D6D039776742 690F5B0D9A26939B
|
||||
0131D9619DC1376E 5CD54CA83DEF57DA 7A389D10354BD271
|
||||
07A1133E4A0B2686 0248D43806F67172 868EBB51CAB4599A
|
||||
3849674C2602319E 51454B582DDF440A 7178876E01F19B2A
|
||||
04B915BA43FEB5B6 42FD443059577FA2 AF37FB421F8C4095
|
||||
0113B970FD34F2CE 059B5E0851CF143A 86A560F10EC6D85B
|
||||
0170F175468FB5E6 0756D8E0774761D2 0CD3DA020021DC09
|
||||
43297FAD38E373FE 762514B829BF486A EA676B2CB7DB2B7A
|
||||
07A7137045DA2A16 3BDD119049372802 DFD64A815CAF1A0F
|
||||
04689104C2FD3B2F 26955F6835AF609A 5C513C9C4886C088
|
||||
37D06BB516CB7546 164D5E404F275232 0A2AEEAE3FF4AB77
|
||||
1F08260D1AC2465E 6B056E18759F5CCA EF1BF03E5DFA575A
|
||||
584023641ABA6176 004BD6EF09176062 88BF0DB6D70DEE56
|
||||
025816164629B007 480D39006EE762F2 A1F9915541020B56
|
||||
49793EBC79B3258F 437540C8698F3CFA 6FBF1CAFCFFD0556
|
||||
4FB05E1515AB73A7 072D43A077075292 2F22E49BAB7CA1AC
|
||||
49E95D6D4CA229BF 02FE55778117F12A 5A6B612CC26CCE4A
|
||||
018310DC409B26D6 1D9D5C5018F728C2 5F4C038ED12B2E41
|
||||
1C587F1C13924FEF 305532286D6F295A 63FAC0D034D9F793
|
||||
1
Common/3dParty/cryptopp/TestData/dh1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dh1024.dat
Normal file
@ -0,0 +1 @@
|
||||
30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102
|
||||
1
Common/3dParty/cryptopp/TestData/dh2048.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dh2048.dat
Normal file
@ -0,0 +1 @@
|
||||
308201080282010100EB60DBD494AAFBCD2EAC6A36DB8E7DD4A2A64512A5BBB15B9BFB581C7C1CAFB647D4612973C3770C2166D75EEA695F67EA8261557591DB78BCF5A886AA5294F3AEE4D25B57C8EE8C7FE8DBF70C132CD7FFCB6F89426F807F552C5DAE2FB1F329E340094E4B30D8EF6265AB4D350E9837B151C86AC524DE4E1FC04746C668BE318275E420D51AEDDFBDF887D435CDEEF6AC81293DB45287132F8236A43AD8F4D6642D7CA6732DA06A1DE008259008C9D74403B68ADAC788CF8AB5BEFFC310DCCCD32901D1F290E5B7A993D2CF6A652AF81B6DA0FD2E70678D1AE086150E41444522F20621195AD2A1F0975652B4AF7DE5261A9FD46B9EA8B443641F3BBA695B9B020103
|
||||
1
Common/3dParty/cryptopp/TestData/dlie1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dlie1024.dat
Normal file
@ -0,0 +1 @@
|
||||
308201370201003082011706072A8648CE3804013082010A02818100D4EC6B7A18416519C76766726B3D2D5F054D107B30E97691B15EB0DCDF452B77F10E12C14450AB107BE349C2DF3A2DBD9D844A24ABA21B328D568E8EC6B959E70BADE5C49879AE4447F643360523469B55AFDC459B45634F657AA79918772F2BA9508ACD43C95C16650A1251B8173EBA1B9B59FE8C57F6240EA49A4FE8855CEF0281806A7635BD0C20B28CE3B3B339359E96AF82A6883D9874BB48D8AF586E6FA295BBF8870960A22855883DF1A4E16F9D16DECEC2251255D10D9946AB4747635CACF385D6F2E24C3CD72223FB219B0291A34DAAD7EE22CDA2B1A7B2BD53CC8C3B9795D4A84566A1E4AE0B32850928DC0B9F5D0DCDACFF462BFB1207524D27F442AE77020102041702150C9C14EEFA749DCE9A2A4B7065768767BA48BBB62F
|
||||
1
Common/3dParty/cryptopp/TestData/dlie2048.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dlie2048.dat
Normal file
@ -0,0 +1 @@
|
||||
308202410201003082021906072A8648CE3804013082020C0282010100A8E87254E7F56CB5857786364ACC39F2A0F79FFF8ED6C62C64EE45FC1C775CDDBFD9CBCEF8262DBD2CECE4E5AFECA239B9B4B7D3CBA228366500F5B2203CA6C0CB0AB6698F73921B4831BA598DFA8268A07368A64774C77808AB7CB7978F839304B10567F8C9C34F8DBDB66BB928EDE6327773AA6C20A8F4E9C2AE0C66A0516E057BBC87760CF39270726F1863260CD5ADDAF366318E7029851A6F85B2349DF29629319A3662354DBCAD0789D02AC6BD804C06523900166501041963BD7EFFE0069694A54F4542172A29B1F09D26E3F052AE5274A898058BE549650BC2066DDFDB84D582E6503AF42BCB2B674F2A2A77C54678FD622FFCA2D9718BF8B0525AEF028201005474392A73FAB65AC2BBC31B25661CF9507BCFFFC76B6316327722FE0E3BAE6EDFECE5E77C1316DE96767272D7F6511CDCDA5BE9E5D1141B32807AD9101E536065855B34C7B9C90DA418DD2CC6FD41345039B45323BA63BC0455BE5BCBC7C1C9825882B3FC64E1A7C6DEDB35DC9476F3193BB9D53610547A74E15706335028B702BDDE43BB0679C93839378C3193066AD6ED79B318C73814C28D37C2D91A4EF94B1498CD1B311AA6DE5683C4E815635EC02603291C800B3280820CB1DEBF7FF0034B4A52A7A2A10B9514D8F84E9371F82957293A544C02C5F2A4B285E10336EFEDC26AC173281D7A15E595B3A795153BE2A33C7EB117FE516CB8C5FC58292D77020102041F021D031D7EC405D3E11D031B7B66DF9EFFCC5173B9B1639E4EC920731484EE
|
||||
1
Common/3dParty/cryptopp/TestData/dsa1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dsa1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082014A0201003082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0416021426EBA66E846E755169F84A1DA981D86502405DDF
|
||||
1
Common/3dParty/cryptopp/TestData/dsa1024b.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dsa1024b.dat
Normal file
@ -0,0 +1 @@
|
||||
308201B73082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0381850002818100D30312B7179661DA4691EDE39A71CB961199CD792C50AED6EA7E1A24C53590B6BCD92F26509D3372B2849A17C99C0962FBE4A2606CA37E6DF10244805363450FFAA24A7C274DF0B5D24AE7F31A8319FD2AA6E98AC6E7E3364E7AEDE575A9993609B0DFA387084141EA0B5B2D59B6DE718C0DAB4F86BC59F0DBE8602AED933494
|
||||
1
Common/3dParty/cryptopp/TestData/dsa512.dat
Normal file
1
Common/3dParty/cryptopp/TestData/dsa512.dat
Normal file
@ -0,0 +1 @@
|
||||
3081C60201003081A806072A8648CE38040130819C0241008DF2A494492276AA3D25759BB06869CBEAC0D83AFB8D0CF7CBB8324F0D7882E5D0762FC5B7210EAFC2E9ADAC32AB7AAC49693DFBF83724C2EC0736EE31C80291021500C773218C737EC8EE993B4F2DED30F48EDACE915F0240626D027839EA0A13413163A55B4CB500299D5522956CEFCB3BFF10F399CE2C2E71CB9DE5FA24BABF58E5B79521925C9CC42E9F6F464B088CC572AF53E6D78802041602142070B3223DBA372FDE1C0FFC7B2E3B498B260614
|
||||
1
Common/3dParty/cryptopp/TestData/elgc1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/elgc1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082018E028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BCABCBA4E458812DB601FCD04609D435317181236B9702010202818038FBC56751763146BC107ECC59E9BAD3852EBC38799B41B40EF5745810BCF9DCC6D569B7E61063EA358B0DF2A194910029B72A9CFD11AD240681D3F976EDCB18D79C0530AB2944DC1E314C2B520BE23066C802754C19BF2EC15DE0439E2663383CEA5163DC857B6A5F91079F54FB47C9B33F23A9EB6B3FCBA8581524B3EC5C75028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BC7F3EC6725F2FC0A6155ADCA43CEE7319E623824852
|
||||
1
Common/3dParty/cryptopp/TestData/esig1023.dat
Normal file
1
Common/3dParty/cryptopp/TestData/esig1023.dat
Normal file
@ -0,0 +1 @@
|
||||
3081E00281807040653BA4FCD5C66E3318B31E82654C5A62957F68D2EE6AE10BD6678D7A14EEF8EBF0C85F28FE22056C12B2A2DD4E9C897EB2FF06D57DB03B872C049ED2806DC3E4D86F2947D134065AC642F233F95FBCB55C533274FA91FFDC0CEB9E71B8795B71A977C7956001FC19E28DE18A80B20E4AE8F775B952CEEA0DEFEAE8E93D7F020120022B1EC74E9FC5EEA090E8DDF4BDB64861C7DC3F8EC7E64286EC2FE39DA55B4763C582DB48146521BDEF0146D5022B1E559EB15755298408E4E4C6F4791BF075C7A8C9B3C7F5B7FA3E8C322BA0A160C09A9DB6BBC4974BE0F877
|
||||
1
Common/3dParty/cryptopp/TestData/esig1536.dat
Normal file
1
Common/3dParty/cryptopp/TestData/esig1536.dat
Normal file
@ -0,0 +1 @@
|
||||
3082014D0281C100E2A6788AB3CC986AEC06C51690143D3677141645D0628165EE924B9AFB7E6EDD52D90145B2F6031522C7A6CEC05E358F42B7837DACEA589F868F8DCA1C0F5FD8E5EDB8BBBAFCFF6D64CFCFBE68F46FBA6EFF45BC9D0CBB4F7F6075F5FFC2049C2F304B51C417764E18D182926E02D4116CE5C5C010E3D0AA6872A49B0D1FF4B37D54689C31F5821D04E9D4DB34D7536EE7F88B8C481B0EC1F93193A0B70567E6FD76E9FAC4F67BB47DACD356D0C8015261E068DDF8C34C0CAFCF3FA775577FEB020120024100FAF0F292EE96D4F449024F86C0A104E0633C722586EC00AD33E0234629825D2081BA337597889CAC55DC6BEBDD8F13FE3AA2133D6371601A37D195DA7BC45EF3024100EBE16F88887A425AA08E271467CC2220DC44012AB24ED4FF3512A96E8CB600C8BBCB771459FF0EE63D4B6786952A83A7143A775073F0A1D69B6D0B5817755673
|
||||
1
Common/3dParty/cryptopp/TestData/esig2046.dat
Normal file
1
Common/3dParty/cryptopp/TestData/esig2046.dat
Normal file
@ -0,0 +1 @@
|
||||
308201B70282010028B1F9CDF87EF6D74F3AC2EA83C17CE376215FB2B3B4817145F1A137FB86B0F7BF0F9BA1BDCF7CC15DF1884DD1B150A983279B90F7A1E4392CB3C16390771DA5668E68621C3898DF66BD254F3787ECFB64B3435E707D5C237A6C09F407D8CD618CC3BBFBAB3DEBA38A0D1A88B2A4E09AE32FF2064EF1896348D5B83047EC2E079D85662EED4A66FBB9C159A617EE3C333BAED66989740F54C3CB336C0EF71130786E70648F2698F4F4192DA06C1578FDB065F8E320EFB63049E4BA664F215924B3E89F69131C5987F357C54593BE173A7AED2D37BE69F90CB574EF83AD49145EB15950FADE9E848DA83BC2CACBEDCAFC4A3B31BFFBBFC4DD03B8E47A218A51410201200256033F9C3F8BDDC021503A687BEC90438F38FF9C0E4C050DD95E46BACA370F478B843611A94BC37B5E838AABFD4ECCCE757BAC967DF8A7DD219B3A71A4DA64D54AB367622B7EB9B4282E898755F02036E91D2A12C81F41025603DB3DE2AE2B52889148C98D68F2B7606B0E5112E60E6A6FF5FD98E5D74143C000B43BEC77082F17C1EF4C82127010B12438D498AAFE8521E21EE6391627D464B54D1BE31F57FFF18C27EC38F08093EA65139A61A2C1
|
||||
23
Common/3dParty/cryptopp/TestData/gostval.dat
Normal file
23
Common/3dParty/cryptopp/TestData/gostval.dat
Normal file
@ -0,0 +1,23 @@
|
||||
BE5EC2006CFF9DCF52354959F1FF0CBFE95061B5A648C10387069C25997C0672
|
||||
0DF82802B741A292 07F9027DF7F7DF89
|
||||
|
||||
B385272AC8D72A5A8B344BC80363AC4D09BF58F41F540624CBCB8FDCF55307D7
|
||||
1354EE9C0A11CD4C 4FB50536F960A7B1
|
||||
|
||||
AEE02F609A35660E4097E546FD3026B032CD107C7D459977ADF489BEF2652262
|
||||
6693D492C4B0CC39 670034AC0FA811B5
|
||||
|
||||
320E9D8422165D58911DFC7D8BBB1F81B0ECD924023BF94D9DF7DCF7801240E0
|
||||
99E2D13080928D79 8118FF9D3B3CFE7D
|
||||
|
||||
C9F703BBBFC63691BFA3B7B87EA8FD5E8E8EF384EF733F1A61AEF68C8FFA265F
|
||||
D1E787749C72814C A083826A790D3E0C
|
||||
|
||||
728FEE32F04B4C654AD7F607D71C660C2C2670D7C999713233149A1C0C17A1F0
|
||||
D4C05323A4F7A7B5 4D1F2E6B0D9DE2CE
|
||||
|
||||
35FC96402209500FCFDEF5352D1ABB038FE33FC0D9D58512E56370B22BAA133B
|
||||
8742D9A05F6A3AF6 2F3BB84879D11E52
|
||||
|
||||
D416F630BE65B7FE150656183370E07018234EE5DA3D89C4CE9152A03E5BFB77
|
||||
F86506DA04E41CB8 96F0A5C77A04F5CE
|
||||
11
Common/3dParty/cryptopp/TestData/ideaval.dat
Normal file
11
Common/3dParty/cryptopp/TestData/ideaval.dat
Normal file
@ -0,0 +1,11 @@
|
||||
00010002000300040005000600070008 0000000100020003 11FBED2B01986DE5
|
||||
00010002000300040005000600070008 0102030405060708 540E5FEA18C2F8B1
|
||||
00010002000300040005000600070008 0019324B647D96AF 9F0A0AB6E10CED78
|
||||
00010002000300040005000600070008 F5202D5B9C671B08 CF18FD7355E2C5C5
|
||||
00010002000300040005000600070008 FAE6D2BEAA96826E 85DF52005608193D
|
||||
00010002000300040005000600070008 0A141E28323C4650 2F7DE750212FB734
|
||||
00010002000300040005000600070008 050A0F14191E2328 7B7314925DE59C09
|
||||
0005000A000F00140019001E00230028 0102030405060708 3EC04780BEFF6E20
|
||||
3A984E2000195DB32EE501C8C47CEA60 0102030405060708 97BCD8200780DA86
|
||||
006400C8012C019001F4025802BC0320 05320A6414C819FA 65BE87E7A2538AED
|
||||
9D4075C103BC322AFB03E7BE6AB30006 0808080808080808 F5DB1AC45E5EF9F9
|
||||
1
Common/3dParty/cryptopp/TestData/luc1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/luc1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082015202010002818100B7FE59813AF3A5DA48144EF03E5D229E3CFB55B0E3CEB63F9F973AC8655651409C3B36BBBE83698516F42A2E0FDC87DD83541697249D67FB5A91FA73470089C4997667811283CF22C74856F1E71129DB70FB23620A60E532B7931B7F93C0B9AA6B9D60E87529002BF2204B743773F501F6C370D067C7B22F6AD9DC07E8097347020111024100CFEA6177386C04D1668C984C39A7F889B36BB2B3BED2C7B83241D267F8D2038529AEB56D82CDE43264168873375C8D1F0897666CCC3F617C2F6B52E5143303C7024100E28BAB645993166EE1A984967AE8839EA41685F1E6392DBEB83EE6CA85A54396505DBD4E5C9024BAFCF27AD24D571DC6A3795CE7F0432669BCE742AF8FAF1481024078C6F402C266595B4F85098370528C2C0309BE93F6C45FC049F6AD987471A979FE215CC41455AA85F5A5B664F59E2F8E33C97C211698D14AD05FC65044F99510
|
||||
1
Common/3dParty/cryptopp/TestData/luc2048.dat
Normal file
1
Common/3dParty/cryptopp/TestData/luc2048.dat
Normal file
@ -0,0 +1 @@
|
||||
308202960201000282010100EF8E1C8C8FB330A26C2449F1A50F7BD457D131C66D3194ECA20CE06138CC95CBE32E1DF910E13FF2D74823363286E3461E4BA3037EA32D4728F262C2364692E5948B8577F651292D72EF42445C2AAF11A526D2235DCE172A6E762EB86178BB5B4A06B8736567DB1525C8BDEB7242C81CC9090F5EF7CFC193FABEA3E5B5407E7DFDDF2D557487C65302148969F28DEC68AC3166FD52D44F1DE2EA74451A4BA0508F09E2F4AB85D89E7D68EEE4E8F9BD5A4858BAE8BF36E3A31FF06DDECDD40AE70932ECD09B65617B3208FF203EFBB0D822CDC1887EF343EBECBB762FA9C5D9F9339C80C96D6F3D8E4F7298FF6C94581C3CBC21C8CA94015F2E48400C0556B70502011102818100FDAD5D856662FC0284BEEF8470DC328B3B853F5819F037EBC786EB0225FD5C45B5BF99073F6E6CE31E4D1BC31105A4BAABA3BEC3C28F40E5912E7D3D6E6BE6178164E52F615C65FED1AE61D9D8F858282AF3C59C25A650A9CA72DD2105D95219CFEFEDDEB067647FDBABB659FBF2FF82F33C1A3A8BA73FB5F3D0C5509DFD38FF02818100F1BFA4A7A9506E020F9A57019F4326AE3D974DE9CCEF9BCA284B313DE287378411BDF1C9A1859D9165604EFF2EB1C9A685C0B317A08CF50E5F45AF570EE2C79B35BEA60B38109B4A450E87811CB10D6873F50726248055FE645C5C74FD0482F22CB541D77ED93F8B44CA72C9F550331C516BD061816325F9EF543C4995832BFB0281805184D4DC8796329003CF0EDC79048A12C4C78A1F44D8DE37A5939776A4E19CAA1ADBC4B78BE72EF23F1A5EFFF7377439138ED19D166285D1325CE6C2A7CFA182BDD7B82B2AB63A041C80B17A4D78161C240EDB2D6A494BEB27D28168E02DAE83C50C01EE8384E31111B756DA9B5423A6817F9078E8A750D0DE2CE62CF223601D
|
||||
1
Common/3dParty/cryptopp/TestData/lucc1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/lucc1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082013F0201003082011706072A8648CE3804013082010A02818100E16B572E39DB4D90689753D09CEA97B9CAE9C0AF04203AE5BC7FC985B85D5BB50B1EDEA30CAAD003B455640FEEA79E342F3E8CFF6761051B38D6931A2B0FD0DF8E2210E7DA74CAC5DC1A79D80CD8C0F9FC09D81BAEC94E2F3663F25B0140DF6B3D5AD04CBA27BCF24A92963319FB992E39544370FD28642FE07EB17EDA4D47B902818070B5AB971CEDA6C8344BA9E84E754BDCE574E05782101D72DE3FE4C2DC2EADDA858F6F5186556801DA2AB207F753CF1A179F467FB3B0828D9C6B498D1587E86FC7110873ED3A6562EE0D3CEC066C607CFE04EC0DD764A7179B31F92D80A06FB59EAD68265D13DE7925494B198CFDCC971CAA21B87E943217F03F58BF6D26A3DD020107041F021D03BDAFBB087B5A628730212217B01F15B303A0133D6AF4FC3CAF7286A8
|
||||
1
Common/3dParty/cryptopp/TestData/lucc512.dat
Normal file
1
Common/3dParty/cryptopp/TestData/lucc512.dat
Normal file
@ -0,0 +1 @@
|
||||
3081B302010030819406072A8648CE380401308188024100B89A4AD4826B8FDDBFE3A6C0F5C8F805B7093AFF9BB2BD697C7D113C236BAC99ABF69000E169575CA2A2DDCDD1C7D9D06C63DCCC880121D933DCF598DD85C52102405C4D256A4135C7EEDFF1D3607AE47C02DB849D7FCDD95EB4BE3E889E11B5D64CD5FB480070B4ABAE51516EE6E8E3ECE83631EE66440090EC99EE7ACC6EC2E291020107041702150268EA4C567B18D0E35B1DA9D517CE5D359CD06779
|
||||
4
Common/3dParty/cryptopp/TestData/lucd1024.dat
Normal file
4
Common/3dParty/cryptopp/TestData/lucd1024.dat
Normal file
@ -0,0 +1,4 @@
|
||||
30818702818100EE9C91E2C1D8B0AB999B3F32B3115A36AA95A36B23CC8507D2340FA21EAAF6F6EB
|
||||
1B900839CD9F8AFBFC155467F91FD8917DD46EAC55A266B246DFFFEDDDA79D674F77884D34709DB3
|
||||
452C2C1E2578CCC0CCA91C504039C52762F23F2A391A58B2CAD2DB05666DDF5B9E3C1AC33DB487B7
|
||||
70C82B7E7DCDEE4381562FCEE427FD02010A
|
||||
2
Common/3dParty/cryptopp/TestData/lucd512.dat
Normal file
2
Common/3dParty/cryptopp/TestData/lucd512.dat
Normal file
@ -0,0 +1,2 @@
|
||||
3046024100C339D027E5812ED5D9DE044F3697D0273625E5EA9EC4EF3FB89ADBFA9CD1FBF4D8C0EC
|
||||
1118C44609F499EF644EEAECE2F38B3F67FAC81A075F31A60B5757A87D020109
|
||||
1
Common/3dParty/cryptopp/TestData/lucs1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/lucs1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082015B0201003082013306072A8648CE3804013082012602818100D57B7B758DC8041CE6CFC57DFE0AAA33FC8FEC48BEEA37562AD13359236FFFF6EED3CEB3A7BBC4269A384ED9A296160F12BC666066548E28201CE293B1791F951C8D2C5965696D82B336EFADCF1E0D619EDA43DBB86415BF3EE6F721C0AB17E770EA7B2360A054D3E4E878647245FCF87B2335098303004CDDC2B9DCDA57DB51021D034E48F160EC5855CCCD9F995988AD1B554AD1B591E64283E91A07D151028180017324ADC1F93CF002FA2B0619C60F897CDED488E457685625E1565377483C0FA4A7FD1CAE848C727E76654434CE3CCAF81EC6E6AAA156EEBBEA095F642FD0DA2D043996ACC14A1B1A6110B19C094638E29890B89AF5812E97C5F96F33B1FD7415079947994442295CA34447807662FB70621F069A98AE274D01B2777BF4E97E041F021D00F9F02A2BC1930F1AC93198F3D532BC937941D7C9A1E16F0EB932476E
|
||||
1
Common/3dParty/cryptopp/TestData/lucs512.dat
Normal file
1
Common/3dParty/cryptopp/TestData/lucs512.dat
Normal file
@ -0,0 +1 @@
|
||||
3081C70201003081A806072A8648CE38040130819C024100E64283E91A07D10F557B7B758DC8041CE6CFC57DFE0AAA33FC8FEC48BEEA37562AD13359236FFFF6EED3FB921690D2FD1339F8E1DD406EED70D7EE3085E3AADD02150F4E48F160EC5855CCCD9F995988AD1B554AD1B5F3024062503DFB092F0FD0D8BBD90B50A834A6BD5B0995BCFC1CC8C8C83103AA6837F3FBFF3E042E1B25E36963DB2FCFD7AD24A6626E65A1F6EECBB399F5CE73659F29041702150450A037413E9A711E601318AF21D32A498C0C501E
|
||||
9
Common/3dParty/cryptopp/TestData/marsval.dat
Normal file
9
Common/3dParty/cryptopp/TestData/marsval.dat
Normal file
@ -0,0 +1,9 @@
|
||||
00000000000000000000000000000000 00000000000000000000000000000000 DCC07B8DFB0738D6E30A22DFCF27E886
|
||||
00000000000000000000000000000000 DCC07B8DFB0738D6E30A22DFCF27E886 33CAFFBDDC7F1DDA0F9C15FA2F30E2FF
|
||||
CB14A1776ABBC1CDAFE7243DEF2CEA02 F94512A9B42D034EC4792204D708A69B 225DA2CB64B73F79069F21A5E3CB8522
|
||||
86EDF4DA31824CABEF6A4637C40B0BAB 4DF955AD5B398D66408D620A2B27E1A9 A4B737340AE6D2CAFD930BA97D86129F
|
||||
000000000000000000000000000000000000000000000000 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 97778747D60E425C2B4202599DB856FB
|
||||
D158860838874D9500000000000000000000000000000000 93A953A82C10411DD158860838874D95 4FA0E5F64893131712F01408D233E9F7
|
||||
791739A58B04581A93A953A82C10411DD158860838874D95 6761C42D3E6142D2A84FBFADB383158F F706BC0FD97E28B6F1AF4E17D8755FFF
|
||||
0000000000000000000000000000000000000000000000000000000000000000 62E45B4CF3477F1DD65063729D9ABA8F 0F4B897EA014D21FBC20F1054A42F719
|
||||
FBA167983E7AEF22317CE28C02AAE1A3E8E5CC3CEDBEA82A99DBC39AD65E7227 1344ABA4D3C44708A8A72116D4F49384 458335D95EA42A9F4DCCD41AECC2390D
|
||||
1
Common/3dParty/cryptopp/TestData/mqv1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/mqv1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082011E028181009A21FC66469293103CEF66960B17880F905C738DB692B7481922FC2D454D14067C6BFC158B93FCC1B8D128D4D86D893082F8A3592238EE8B693B6245F26F55968D7D13752D6BFBA271E8E36E11482815D887BB9F6B600E820E7E2AF2EE6ECDBC1CB35B12A4EF48A8907C090482DE7D49B751BB3A50F78BE29506114BC85D3A6102150C896422EC558A74B883BA85E2F10D4A58F28D2B09028180350C4BB19C0A9B224E5E1BACCC1B1952A97628021B4673831C851C3280F06D3EFA73DAE27E5D4E4A0499E0B2B9A369649E883A1F260EF250B5CCF3E3C922332B210EEA07D3BF92210BA7A7374A30DDDE3D1B3D575B77CD36B001EAE4A2A3BFAFF12FCE74F3330B30ACF6DCFF580ECBFB5B00FD5DD2B8EA9DB09C7E1C7100BD67
|
||||
1
Common/3dParty/cryptopp/TestData/mqv2048.dat
Normal file
1
Common/3dParty/cryptopp/TestData/mqv2048.dat
Normal file
@ -0,0 +1 @@
|
||||
308202280282010100A5C07CE5BF0894C0BA8752F4D9A6D0BF6556D325B618A655CCFE3EEC85B56D47DBDF5A9A5C8588AE6F4C44BBCB339E869A21BE057A243DC797B912C547FBA359C4FC9965C72278370AB6C0DD246197A8D83A08C69425786482D1744C41FBB3C36BEA5963C05B0778AAEF9230C3E2E12072268038E5ADB6433542F94D8C25A6A1785E4D2D97AF119F2139E69AECA46F11B344785A0B1B280CF8D678AB9627780271A350A9B15B92E105F14733C5F15C1753F7C48A645FAAAC1BFA266B5AD6F7C46350465DA31150ABB10FF63FD6C01C849DFCD5645C5D1AF8B967372449DF90D02177E12439BD36A1EED1FAEDB8166927F755B71A5368CC27CD00AB5CF04601E7021D03134944D9AA15697107F48AC5621A1531649AD5EE8EEC1D1F282B5481028201003468652FBB1E3C7F2FBB99A89EA14FB9205F534943034CDE9D9CC57A790D9713EC7B21032EAA8ED2B24FFABD612EDADFC9265964C753AE276380294D4D16C63389A4C392A0058EF1549F6C0D13C4A09759C67650A51F7362B38C61AF2942A6004BB8C3CD4C489E66DE1567E2306821788A519727CD27945DBC5778AC6E8B1DFC05573D76DF9E9AA4F1CE657A2A07BEF833091614C0A6065507BD51099C54148327903626DE6D01FEC9A7F5F9A901C90E219D452C2E2A90AA2303A52776EF174CC85C1AA4F28924B1DFF3E3C5538D820A422374DCFB0D14D620AE282A72416C6506F02D3ED1E6208F66B9DB49294D8D605D7D146BB6A970211289B1BE7AB12531
|
||||
1
Common/3dParty/cryptopp/TestData/nr1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/nr1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082014C0201003082012C06072A8648CE3804013082011F02818100F89F4EBE58E222B517D218D615BDC00611501CD18417886BD3FCBD22578C4611B1E8C06EB0FE9D473A5589BC277AA58C1979DC2869B728D78EC38B4C044A790A60314E7BD3DFDC0BBD8B770A9271D7D048F3E13C73866D096C7304782125847C70EDD721B36F1C379CF7CCEE0A728DD66336ED5F93E8A1BD3EDB22C8761EB987021526A578AB11C3A0812A636D24D120BE544B7973E4D302818100BF927ACE4D175A44622494E37F9552E97B74303321FFEF9B76CDECB14F7D612608DDFEA77C04A8FCACCF7F16CB01AE05AD5EDB65C3B9A380D720F34C7D96C8817E2EFF7D0049EE149DF61C52D7C80271206155CDAEBC8A7F4A8DCE5196E3C18FD5EDF11A394C43A5D59BC65D976817438CA0A7F01713548F61355E976DE75E1E04170215247B2531CFF01D1B1665F0CFD2A836446798353330
|
||||
1
Common/3dParty/cryptopp/TestData/nr2048.dat
Normal file
1
Common/3dParty/cryptopp/TestData/nr2048.dat
Normal file
@ -0,0 +1 @@
|
||||
3082025D0201003082023506072A8648CE38040130820228028201010083C69F32A1F3A67B201D7A92BA204281681DAAD29F50BD866D70A2E01438653B18602AFE606AA925389381682EC0E2CE5D5D366793917879860799ECEDDB4831ED4A4E76D9C34FFDD0BC786588F00E8A19705B997C4298F9CAF9AEE46E0A5677AA1240DC141BD78A8720A829F64C912FA3D961ADE698C5344F18FE4CE70CF7B94F45258C6A9553830FFB80B6BB7E1C510D4526C1904C1D6E2F1B8C1CA6499DBD291438717131804FA2F5F42E5C06293D6DA493C88A38EBC6A6DCF40B2BAB0BF7C7FA0F9C070F1C48FD12CA2B7337E9C58EB9AFDAC6FEEAB0BD62415B26D405D6BF47F11D70B1740BC398A76BE70723A829082EB548D35F4D78E4E015DAD12D5B021D083118E4DC11622CB53E7E4D7634BFBDE45A2D8F8B097A251803505315028201005BAC6CBFE089F75274A532564735786477478F19BE099AB38E0F843393D6D81964CBCFF4B68C5DA2614F06BB844672288F0A65216954990051BA691CA6796AFAAE91A79350F53D9DF3CC688387306EFFDCEF70A14A672E2103B8C861523703157D05DF6EB42DCD81506C88300ED8D8ED40D41AB6D669D309C976B84D82C8D18747578358CBA1EF4B00118B0DEEF11409DD8CB0D83399A33E10C18249574FA2242AE4241CD789C891FEC1C63771EE4517274493240EDAAC44AEDC42F318A5122B052244DFA9A282B8D94BC4BAB360D44E4D0204F8D28817B5B6F808047C92032AA94926D697CFA2FC211FAAE26A5F1FC2B1EB03DA68AD5E01EAC489FB64A66EA3041F021D042ADA16929DA18A7A3C8FDCDD8FC46A6D8AAB79FF33D60E2BF09DEF4F
|
||||
1
Common/3dParty/cryptopp/TestData/rabi1024.dat
Normal file
1
Common/3dParty/cryptopp/TestData/rabi1024.dat
Normal file
@ -0,0 +1 @@
|
||||
3082015202818100D132EDB1360E31D7B8DD84BB03111FDE0243FFE4031ED12B440E7FF36A634E57772EC81FFDC065607494717C6E16A5AB642283553442CC22569535C7A20E3D1C3E2B3747B26E9856D4A13D0325DC116DAAF8554B000321A753E5CFA730CA60F3E3FE2CA9750C6734A2A113AD4A76B6DAC5E199AB55F34CE6984BF56F6DFAC51D020105020102024100F90CBF726FA70ACB5074BD8E79932B74E9949057B627ABB29F41E5057AE699A03BC240EBB9637E956ABC0B6A20F633F78168A908086E2011FC5D030B9B94B51B024100D7097ACACD8BF8ED641A7D8A17A23F8FB385B92B760EEEB9A1233E1D25892F742315DE23DA0751F24EAE4C0C5B696D0AA0D16EAE94194193DC89D479A9626A2702403B5475CD2A7F519EF08433407826D89983C104AF1E74B44B79B31770149D224089300F828E0DF4CBC864BDB394C0F32CCF055F7B2B8872BF0B5F148020637B9C
|
||||
1
Common/3dParty/cryptopp/TestData/rabi2048.dat
Normal file
1
Common/3dParty/cryptopp/TestData/rabi2048.dat
Normal file
@ -0,0 +1 @@
|
||||
308202970282010100B8F2A74040753A7706CB98B80DD9EE33FB7969FCA65A2025E96853267AEF80ABB184FE463B9475F5166307FAFA988F6CA4BBC7122E9555755191AA408BAF4464221394342104ED2762EEA4FED8B5CDB4234442AB979A487446AB37C4A4FD67C259EB942E28B50DD54F3AA14447931821291D4C21BB8BD58C41302F3E1D2E6FF84F84AACEC02196282C492E0354985A66EBA50B1903EDF70D98BD9837E694876505760C58C186F0B5F6500711500297956C9825EBDCCF90633239484F9A3572271D3CD585BFC195BED0D5FFCABE785B25BFF6ACFF2B7C125D54B26CFEF60B1B077B2F953960DAEB57F102B6A1E30AA88B643090BC4D8971077C1B54EA61E4E45102011302010D02818100D02603BBFDB55F1063DFCEBB4CA32F551330E0F2901D87DF2A395EF6AF340F6352CE3514FCE85705652DC6BD401CD0D5D13855B124DA172D5183A7474B85B683AA03382775F3D8DC600F33E696246F9F2134E2DA061923F47B85A923EBB375B07DE3B43EE4FD71D3E24B4B416DAE6E4C2B6D32A9B45BF04296AECAD60C33DA0702818100E3773B5D8B828BEA922392100C54CDF41D0CD26B4C34A64F483B7975AB35920DA0E3F6AE238E72E26F8A498D9AD0C4A75C52F25421E1E2E3865ADD1A0FCEA4DE932DBE6EBEFA689494855B11714B960F57C5102C0E8876D253ABA8C2D6A511DBC0F30589A0FBE66AD6BCEFDFC4F67F8347726A52736274B7F744ECACFF6198E702818100BF84B25DB607930F80ED57C7AF89E7604B7E8E0D341C9C4A0C94FFE6D4B38810553B1E92F7BF9651D3D0149A9188E1FFD1FB86753A327ABC6169AF92271E7204A2C76488FBC781984BA99C3C48C8A799054DA34A201743C3064B4609831B35FBA2B8B1BC67FFD0C685DBA92FE688AD51D1F161C06EC0B9E0D0E187863BFBBEC0
|
||||
48
Common/3dParty/cryptopp/TestData/rc2val.dat
Normal file
48
Common/3dParty/cryptopp/TestData/rc2val.dat
Normal file
@ -0,0 +1,48 @@
|
||||
08
|
||||
3F
|
||||
00000000 00000000
|
||||
00000000 00000000
|
||||
ebb773f9 93278eff
|
||||
|
||||
08
|
||||
40
|
||||
ffffffff ffffffff
|
||||
ffffffff ffffffff
|
||||
278b27e4 2e2f0d49
|
||||
|
||||
08
|
||||
40
|
||||
30000000 00000000
|
||||
10000000 00000001
|
||||
30649edf 9be7d2c2
|
||||
|
||||
01
|
||||
40
|
||||
88
|
||||
00000000 00000000
|
||||
61a8a244 adacccf0
|
||||
|
||||
07
|
||||
40
|
||||
88bca90e 90875a
|
||||
00000000 00000000
|
||||
6ccf4308 974c267f
|
||||
|
||||
10
|
||||
40
|
||||
88bca90e 90875a7f 0f79c384 627bafb2
|
||||
00000000 00000000
|
||||
1a807d27 2bbe5db1
|
||||
|
||||
10
|
||||
80
|
||||
88bca90e 90875a7f 0f79c384 627bafb2
|
||||
00000000 00000000
|
||||
2269552a b0f85ca6
|
||||
|
||||
21
|
||||
81
|
||||
88bca90e 90875a7f 0f79c384 627bafb2 16f80a6f 85920584
|
||||
c42fceb0 be255daf 1e
|
||||
00000000 00000000
|
||||
5b78d3a4 3dfff1f1
|
||||
5
Common/3dParty/cryptopp/TestData/rc5val.dat
Normal file
5
Common/3dParty/cryptopp/TestData/rc5val.dat
Normal file
@ -0,0 +1,5 @@
|
||||
00000000000000000000000000000000 0000000000000000 21A5DBEE154B8F6D
|
||||
915F4619BE41B2516355A50110A9CE91 21A5DBEE154B8F6D F7C013AC5B2B8952
|
||||
783348E75AEB0F2FD7B169BB8DC16787 F7C013AC5B2B8952 2F42B3B70369FC92
|
||||
DC49DB1375A5584F6485B413B5F12BAF 2F42B3B70369FC92 65C178B284D197CC
|
||||
5269F149D41BA0152497574D7F153125 65C178B284D197CC EB44E415DA319824
|
||||
17
Common/3dParty/cryptopp/TestData/rc6val.dat
Normal file
17
Common/3dParty/cryptopp/TestData/rc6val.dat
Normal file
@ -0,0 +1,17 @@
|
||||
00000000000000000000000000000000
|
||||
00000000000000000000000000000000 8FC3A53656B1F778C129DF4E9848A41E
|
||||
|
||||
0123456789ABCDEF0112233445566778
|
||||
02132435465768798A9BACBDCEDFE0F1 524E192F4715C6231F51F6367EA43F18
|
||||
|
||||
000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000 6cd61bcb190b30384e8a3f168690ae82
|
||||
|
||||
0123456789abcdef0112233445566778899aabbccddeeff0
|
||||
02132435465768798a9bacbdcedfe0f1 688329d019e505041e52e92af95291d4
|
||||
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000 8f5fbd0510d15fa893fa3fda6e857ec2
|
||||
|
||||
0123456789abcdef0112233445566778899aabbccddeeff01032547698badcfe
|
||||
02132435465768798a9bacbdcedfe0f1 c8241816f0d7e48920ad16a1674e5d48
|
||||
9
Common/3dParty/cryptopp/TestData/rijndael.dat
Normal file
9
Common/3dParty/cryptopp/TestData/rijndael.dat
Normal file
@ -0,0 +1,9 @@
|
||||
000102030405060708090A0B0C0D0E0F 000102030405060708090A0B0C0D0E0F 0A940BB5416EF045F1C39458C653EA5A
|
||||
00010203050607080A0B0C0D0F101112 506812A45F08C889B97F5980038B8359 D8F532538289EF7D06B506A4FD5BE9C9
|
||||
14151617191A1B1C1E1F202123242526 5C6D71CA30DE8B8B00549984D2EC7D4B 59AB30F4D4EE6E4FF9907EF65B1FB68C
|
||||
28292A2B2D2E2F30323334353738393A 53F3F4C64F8616E4E7C56199F48F21F6 BF1ED2FCB2AF3FD41443B56D85025CB1
|
||||
00010203050607080A0B0C0D0F10111214151617191A1B1C 2D33EEF2C0430A8A9EBF45E809C40BB6 DFF4945E0336DF4C1C56BC700EFF837F
|
||||
1E1F20212324252628292A2B2D2E2F30323334353738393A 6AA375D1FA155A61FB72353E0A5A8756 B6FDDEF4752765E347D5D2DC196D1252
|
||||
3C3D3E3F41424344464748494B4C4D4E5051525355565758 BC3736518B9490DCB8ED60EB26758ED4 D23684E3D963B3AFCF1A114ACA90CBD6
|
||||
00010203050607080A0B0C0D0F10111214151617191A1B1C1E1F202123242526 834EADFCCAC7E1B30664B1ABA44815AB 1946DABF6A03A2A2C3D0B05080AED6FC
|
||||
28292A2B2D2E2F30323334353738393A3C3D3E3F41424344464748494B4C4D4E D9DC4DBA3021B05D67C0518F72B62BF1 5ED301D747D3CC715445EBDEC62F2FB4
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user