mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-03-01 00:31:50 +08:00
Compare commits
20 Commits
core-win-6
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| f624f731de | |||
| c94768902b | |||
| f575947c03 | |||
| 16bdbafa75 | |||
| 089871d3ae | |||
| 765677d952 | |||
| 6afc38c899 | |||
| a43639587f | |||
| 46d022388d | |||
| 31363e8f83 | |||
| e1286e4b73 | |||
| 0366bcb341 | |||
| 452f717e0e | |||
| ab3add9577 | |||
| 54939bca61 | |||
| 7ccde9c777 | |||
| 6bdfa26c7e | |||
| a5bae64959 | |||
| 4d04a0d649 | |||
| fb7af5b902 |
@ -314,7 +314,7 @@
|
||||
17E17ED41AC453F800BEA2EA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0710;
|
||||
LastUpgradeCheck = 0830;
|
||||
ORGANIZATIONNAME = "Ascensio System SIA";
|
||||
};
|
||||
buildConfigurationList = 17E17ED71AC453F800BEA2EA /* Build configuration list for PBXProject "ASCOfficeDocxFile2Lib" */;
|
||||
@ -446,8 +446,10 @@
|
||||
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_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -455,6 +457,7 @@
|
||||
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",
|
||||
@ -488,8 +491,10 @@
|
||||
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_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -497,6 +502,7 @@
|
||||
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;
|
||||
|
||||
@ -1427,7 +1427,7 @@ std::wstring NSPresentationEditor::CShapeWriter::ConvertImage()
|
||||
m_oWriter.WriteString(std::wstring(L"<a:xfrm"));
|
||||
if (0 != m_pImageElement->m_dRotate)
|
||||
{
|
||||
m_oWriter.WriteString(L" rot=\"" + std::to_wstring(m_pImageElement->m_dRotate * 60000) + L"\"");
|
||||
m_oWriter.WriteString(L" rot=\"" + std::to_wstring((int)(m_pImageElement->m_dRotate * 60000)) + L"\"");
|
||||
}
|
||||
if (m_pImageElement->m_bFlipH)
|
||||
{
|
||||
|
||||
@ -996,8 +996,8 @@ void CPPTUserInfo::LoadSlide(DWORD dwSlideID, CSlide* pSlide)
|
||||
//даты и номера могут быть и не только в колонтитулах
|
||||
//todooo ... возможно нужно все перенести плейсхолдеры без ID a-la как в AddLayout
|
||||
|
||||
AddLayoutSlidePlaceholder(pSlide, MasterSlideNumber , pLayout);
|
||||
AddLayoutSlidePlaceholder(pSlide, MasterDate , pLayout);
|
||||
//AddLayoutSlidePlaceholder(pSlide, MasterSlideNumber , pLayout);
|
||||
//AddLayoutSlidePlaceholder(pSlide, MasterDate , pLayout);
|
||||
|
||||
//-------------элементы колонтитулов
|
||||
std::multimap<int, int>::iterator it;
|
||||
|
||||
@ -1922,7 +1922,7 @@
|
||||
17063B5B1AC5708E0056A3F1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0730;
|
||||
LastUpgradeCheck = 0830;
|
||||
ORGANIZATIONNAME = "Ascensio System SIA";
|
||||
};
|
||||
buildConfigurationList = 17063B5E1AC5708E0056A3F1 /* Build configuration list for PBXProject "PPTXFormatLib" */;
|
||||
@ -2009,8 +2009,10 @@
|
||||
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_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -2018,6 +2020,7 @@
|
||||
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",
|
||||
@ -2051,8 +2054,10 @@
|
||||
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_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@ -2060,6 +2065,7 @@
|
||||
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;
|
||||
|
||||
@ -99,10 +99,16 @@ HRESULT convert_directory(std::wstring pathName)
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
if (argc < 2) return 1;
|
||||
|
||||
HRESULT hr = convert_single(argv[1]);
|
||||
|
||||
//HRESULT hr = convert_directory(argv[1]);
|
||||
HRESULT hr = -1;
|
||||
if (NSFile::CFileBinary::Exists(argv[1]))
|
||||
{
|
||||
hr = convert_single(argv[1]);
|
||||
}
|
||||
else if (NSDirectory::Exists(argv[1]))
|
||||
{
|
||||
hr = convert_directory(argv[1]);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
@ -102,7 +102,7 @@ int BopPop::serialize(std::wostream & _stream)
|
||||
{
|
||||
CP_XML_NODE(L"c:custSplit")
|
||||
{
|
||||
for (int i = 0 ; i < custom->rggrbit.pie_indices.size(); i++)
|
||||
for (size_t i = 0 ; i < custom->rggrbit.pie_indices.size(); i++)
|
||||
{
|
||||
CP_XML_NODE(L"c:secondPiePt")
|
||||
{
|
||||
|
||||
@ -160,7 +160,7 @@ int CF12::serialize(std::wostream & stream)
|
||||
CFGradient *gradient = dynamic_cast<CFGradient*>(rgbCT.get());
|
||||
CP_XML_NODE(L"colorScale")
|
||||
{
|
||||
for (int i = 0; i < gradient->rgInterp.size(); i ++)
|
||||
for (size_t i = 0; i < gradient->rgInterp.size(); i ++)
|
||||
{
|
||||
CP_XML_NODE(L"cfvo")
|
||||
{
|
||||
@ -181,7 +181,7 @@ int CF12::serialize(std::wostream & stream)
|
||||
CP_XML_ATTR(L"val", cfvo.numValue);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < gradient->rgCurve.size(); i ++)
|
||||
for (size_t i = 0; i < gradient->rgCurve.size(); i ++)
|
||||
{
|
||||
CP_XML_NODE(L"color")
|
||||
{
|
||||
|
||||
@ -54,14 +54,17 @@ BaseObjectPtr Chart3d::clone()
|
||||
void Chart3d::readFields(CFRecord& record)
|
||||
{
|
||||
unsigned short flags;
|
||||
unsigned short pcHeight_raw;
|
||||
record >> anRot >> anElev >> pcDist >> pcHeight_raw >> pcDepth >> pcGap >> flags;
|
||||
record >> anRot >> anElev >> pcDist >> pcHeightPie >> pcDepth >> pcGap >> flags;
|
||||
fPerspective = GETBIT(flags, 0);
|
||||
fCluster = GETBIT(flags, 1);
|
||||
f3DScaling = GETBIT(flags, 2);
|
||||
fNotPieChart = GETBIT(flags, 4);
|
||||
fWalls2D = GETBIT(flags, 5);
|
||||
pcHeight = fNotPieChart ? static_cast<short>(pcHeight_raw) : pcHeight_raw;
|
||||
|
||||
if (fNotPieChart)
|
||||
{
|
||||
pcHeight3D = static_cast<short>(pcHeightPie);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -48,7 +48,6 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeChart3d;
|
||||
@ -57,7 +56,8 @@ public:
|
||||
_INT16 anRot;
|
||||
_INT16 anElev;
|
||||
_INT16 pcDist;
|
||||
_UINT32 pcHeight;
|
||||
_UINT16 pcHeightPie;
|
||||
short pcHeight3D;
|
||||
_INT16 pcDepth;
|
||||
_UINT16 pcGap;
|
||||
|
||||
|
||||
@ -31,14 +31,15 @@
|
||||
*/
|
||||
|
||||
#include "DConRef.h"
|
||||
#include "../../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
DConRef::DConRef()
|
||||
{
|
||||
index_external = -1;
|
||||
bFilePath = false;
|
||||
bSheetName = false;
|
||||
}
|
||||
|
||||
|
||||
@ -54,6 +55,8 @@ BaseObjectPtr DConRef::clone()
|
||||
|
||||
void DConRef::readFields(CFRecord& record)
|
||||
{
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
record >> ref >> cchFile;
|
||||
|
||||
if (cchFile > 1)
|
||||
@ -67,21 +70,109 @@ void DConRef::readFields(CFRecord& record)
|
||||
//self-reference = %x0002 sheet-name
|
||||
|
||||
stFile = stFile_.value();
|
||||
if (stFile.substr(0, 1) == L"\x0001")
|
||||
|
||||
std::wstring sTmp = stFile;
|
||||
|
||||
while(true)
|
||||
{
|
||||
bFilePath = true;
|
||||
stFile = stFile.substr(1);
|
||||
int pos = sTmp.find(L"\x0001");
|
||||
if (pos >= 0)
|
||||
{
|
||||
bFilePath = true;
|
||||
|
||||
path.push_back(sTmp.substr(0, pos));
|
||||
sTmp = sTmp.substr(pos + 1);
|
||||
continue;
|
||||
}
|
||||
pos = sTmp.find(L"\x0002");
|
||||
if (pos >= 0)
|
||||
{
|
||||
path.push_back(sTmp.substr(0, pos));
|
||||
sTmp = sTmp.substr(pos + 1);
|
||||
continue;
|
||||
}
|
||||
pos = sTmp.find(L"\x0003");
|
||||
if (pos >= 0)
|
||||
{
|
||||
bFilePath = true;
|
||||
|
||||
path.push_back(sTmp.substr(0, pos));
|
||||
sTmp = sTmp.substr(pos + 1);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (stFile.substr(0, 1) == L"\x0002")
|
||||
int pos = sTmp.find(L"]");
|
||||
if (pos >= 0)
|
||||
{
|
||||
bSheetName = true;
|
||||
stFile = stFile.substr(1);
|
||||
}
|
||||
file_name = sTmp.substr(1, pos - 1);
|
||||
sheet_name = sTmp.substr(pos + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sheet_name = sTmp;
|
||||
}
|
||||
}
|
||||
|
||||
int unused = record.getDataSize() - record.getRdPtr();
|
||||
record.skipNunBytes(unused);
|
||||
}
|
||||
|
||||
void DConRef::check_external()
|
||||
{
|
||||
bool bFound = false;
|
||||
|
||||
for (size_t i = 0; !bFilePath && i < global_info_->sheets_names.size(); i++)
|
||||
{
|
||||
if (global_info_->sheets_names[i] == sheet_name)
|
||||
{
|
||||
bFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bFound && (!path.empty() || !file_name.empty()) && bFilePath)
|
||||
{//external sheet
|
||||
std::wstring full_path;
|
||||
if (!path.empty())
|
||||
{
|
||||
full_path = get_external_path();
|
||||
}
|
||||
std::unordered_map<std::wstring, std::wstring>::iterator pFind = global_info_->mapPivotCacheExternal.find(file_name);
|
||||
|
||||
if (pFind == global_info_->mapPivotCacheExternal.end())
|
||||
{
|
||||
index_external = global_info_->mapPivotCacheExternal.size() ;
|
||||
|
||||
global_info_->mapPivotCacheExternal.insert(std::make_pair(file_name, full_path));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pFind->second.empty() && !full_path.empty())
|
||||
{
|
||||
pFind->second = full_path;
|
||||
}
|
||||
index_external = std::distance( global_info_->mapPivotCacheExternal.begin(), pFind) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring DConRef::get_external_path()
|
||||
{
|
||||
if (path.empty() && file_name.empty()) return L"";
|
||||
|
||||
std::wstring result = L"file:///";
|
||||
|
||||
for (size_t i = 0; i < path.size(); i++)
|
||||
{
|
||||
result += L"\\" + path[i];
|
||||
}
|
||||
|
||||
if (!file_name.empty())
|
||||
result += L"\\" + file_name;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -57,9 +57,18 @@ public:
|
||||
unsigned short cchFile;
|
||||
std::wstring stFile;
|
||||
|
||||
bool bFilePath;
|
||||
bool bSheetName;
|
||||
std::vector<std::wstring> path;
|
||||
std::wstring file_name;
|
||||
std::wstring sheet_name;
|
||||
|
||||
int index_external;
|
||||
|
||||
void check_external();
|
||||
private:
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
|
||||
std::wstring get_external_path();
|
||||
bool bFilePath;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -65,9 +65,8 @@ void MergeCells::readFields(CFRecord& record)
|
||||
int MergeCells::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
|
||||
for (int i = 0 ; i < rgref.size(); i++)
|
||||
{
|
||||
for (size_t i = 0 ; i < rgref.size(); i++)
|
||||
{
|
||||
Ref8* ref = dynamic_cast<Ref8*>(rgref[i].get());
|
||||
CP_XML_NODE(L"mergeCell")
|
||||
|
||||
@ -86,7 +86,7 @@ int MulRk::serialize(std::wostream & stream)
|
||||
{
|
||||
int row = GetRow();
|
||||
|
||||
for (int i = 0; i < cells.size(); i++)
|
||||
for (size_t i = 0; i < cells.size(); i++)
|
||||
{
|
||||
Cell * cell = dynamic_cast<Cell *>(cells[i].get());
|
||||
RkRec * rkrec = dynamic_cast<RkRec *>(rgrkrec[i].get());
|
||||
|
||||
@ -103,7 +103,7 @@ int Palette::serialize(std::wostream & stream)
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < rgColor.size(); ++i)
|
||||
for(size_t i = 0; i < rgColor.size(); ++i)
|
||||
{
|
||||
LongRGB * rgb = dynamic_cast<LongRGB *>(rgColor[i].get());
|
||||
CP_XML_NODE(L"rgbColor")
|
||||
|
||||
@ -67,7 +67,7 @@ int SIIndex::serialize(std::wostream & _stream, int idx, const CellRef & in_ref)
|
||||
int res = 0;
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
for (int i = 0 ; i < m_arData.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arData.size(); i++)
|
||||
{
|
||||
Number * number = dynamic_cast<Number*> (m_arData[i].get());
|
||||
BoolErr * boolErr = dynamic_cast<BoolErr*>(m_arData[i].get());
|
||||
@ -108,7 +108,7 @@ int SIIndex::serialize(std::wostream & _stream, ChartParsedFormula & in_ref)
|
||||
int idx = 0;
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
for (int i = 0 ; i < m_arData.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arData.size(); i++)
|
||||
{
|
||||
Number * number = dynamic_cast<Number*> (m_arData[i].get());
|
||||
BoolErr * boolErr = dynamic_cast<BoolErr*>(m_arData[i].get());
|
||||
|
||||
@ -83,7 +83,7 @@ int SST::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
for (size_t i=0; i < rgb.size(); i++)
|
||||
for (size_t i = 0; i < rgb.size(); i++)
|
||||
{
|
||||
XLUnicodeRichExtendedString *richText = dynamic_cast<XLUnicodeRichExtendedString *>(rgb[i].get());
|
||||
|
||||
|
||||
@ -72,6 +72,20 @@ int SXDI::serialize(std::wostream & strm)
|
||||
CP_XML_ATTR(L"baseField", df);
|
||||
CP_XML_ATTR(L"baseItem", isxvi);
|
||||
CP_XML_ATTR(L"numFmtId", ifmt);
|
||||
switch(iiftab)
|
||||
{
|
||||
case 0x0000: CP_XML_ATTR(L"subtotal", L"sum"); break;
|
||||
case 0x0001: CP_XML_ATTR(L"subtotal", L"count"); break;
|
||||
case 0x0002: CP_XML_ATTR(L"subtotal", L"average"); break;
|
||||
case 0x0003: CP_XML_ATTR(L"subtotal", L"max"); break;
|
||||
case 0x0004: CP_XML_ATTR(L"subtotal", L"min"); break;
|
||||
case 0x0005: CP_XML_ATTR(L"subtotal", L"product"); break;
|
||||
case 0x0006: CP_XML_ATTR(L"subtotal", L"countNums");break;
|
||||
case 0x0007: CP_XML_ATTR(L"subtotal", L"stdDev"); break;
|
||||
case 0x0008: CP_XML_ATTR(L"subtotal", L"stdDevp"); break;
|
||||
case 0x0009: CP_XML_ATTR(L"subtotal", L"var"); break;
|
||||
case 0x000a: CP_XML_ATTR(L"subtotal", L"varp"); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@ -55,6 +55,11 @@ void SXDtr::readFields(CFRecord& record)
|
||||
|
||||
std::wstring SXDtr::value()
|
||||
{
|
||||
if (mon < 1 || mon > 12) mon = 1;
|
||||
if (dom < 1 || dom > 31) dom = 1;
|
||||
|
||||
if (yr < 1) yr = 1; //???
|
||||
|
||||
std::wstringstream s;
|
||||
s << yr << L"-" << (mon < 10 ? L"0" : L"") << mon << L"-" << (dom < 10 ? L"0" : L"") << dom << L"T"
|
||||
<< (hr < 10 ? L"0" : L"") << hr << L":" << (min < 10 ? L"0" : L"") << min << L":" << (sec < 10 ? L"0" : L"") << sec;
|
||||
|
||||
@ -53,15 +53,17 @@ BaseObjectPtr SXTH::clone()
|
||||
void SXTH::readFields(CFRecord& record)
|
||||
{
|
||||
_UINT32 flags1;
|
||||
unsigned short flags2;
|
||||
unsigned short flags2, reserved;
|
||||
|
||||
record >> frtHeaderOld >> flags1 >> sxaxis >> isxvd >> csxvdXl >> flags2;
|
||||
record >> frtHeaderOld >> flags1 >> sxaxis >> reserved >> isxvd >> csxvdXl >> flags2;
|
||||
|
||||
record >> stUnique >> stDisplay >> stDefault >> stAll >> stDimension;
|
||||
|
||||
record >> cisxvd;
|
||||
for (int i = 0; i < cisxvd; i++)
|
||||
{
|
||||
if (record.getRdPtr() + 4 > record.getDataSize())
|
||||
break;
|
||||
_INT32 val;
|
||||
record >> val;
|
||||
rgisxvd.push_back(val);
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Style record in BIFF8
|
||||
class Style: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Style)
|
||||
@ -49,7 +47,6 @@ public:
|
||||
~Style();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ namespace XLS
|
||||
|
||||
Theme::Theme()
|
||||
{
|
||||
nThemeDataSize = 0;
|
||||
}
|
||||
|
||||
Theme::~Theme()
|
||||
@ -54,16 +55,18 @@ void Theme::readFields(CFRecord& record)
|
||||
{
|
||||
record >> frtHeader >> dwThemeVersion;
|
||||
|
||||
if(!dwThemeVersion)
|
||||
if (dwThemeVersion == 124226)
|
||||
{
|
||||
Log::info("\"Theme\" binary parsing is not implemented.");
|
||||
|
||||
/*
|
||||
std::ofstream file1("D:\\temp.xlsx", std::ios_base::binary);
|
||||
file1.write(record.getCurData<char>(), (record.getDataSize() - record.getRdPtr()));
|
||||
*/
|
||||
//default theme
|
||||
}
|
||||
else if (dwThemeVersion == 0)
|
||||
{
|
||||
nThemeDataSize = record.getDataSize() - record.getRdPtr();
|
||||
pThemeData = boost::shared_array<char>(new char[nThemeDataSize]);
|
||||
|
||||
memcpy(pThemeData.get(), record.getCurData<char>(), nThemeDataSize);
|
||||
record.skipNunBytes(nThemeDataSize);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -54,6 +54,9 @@ public:
|
||||
//-----------------------------
|
||||
_UINT32 dwThemeVersion;
|
||||
FrtHeader frtHeader;
|
||||
|
||||
_UINT32 nThemeDataSize;
|
||||
boost::shared_array<char> pThemeData;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -55,10 +55,11 @@ void XFExt::readFields(CFRecord& record)
|
||||
record >> ixfe;
|
||||
record.skipNunBytes(2); // reserved
|
||||
record >> cexts;
|
||||
|
||||
while(!record.isEOF())
|
||||
{
|
||||
if(record.getRdPtr() + 8 < record.getDataSize())
|
||||
break;// 8 = миним размер структуры
|
||||
if(record.getRdPtr() + 4 > record.getDataSize())
|
||||
break;// миним размер структуры
|
||||
ExtPropPtr element(new ExtProp);
|
||||
record >> *element;
|
||||
rgExt.push_back(element);
|
||||
|
||||
@ -108,63 +108,70 @@ int FillInfo::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"fill")
|
||||
if (!ext.empty())
|
||||
{
|
||||
CP_XML_NODE(L"patternFill")
|
||||
stream << ext;
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_NODE(L"fill")
|
||||
{
|
||||
if (fls < 0 || fls > 18)
|
||||
fls = 1;
|
||||
|
||||
CP_XML_ATTR(L"patternType", PatternType[fls]);
|
||||
|
||||
if (fls > 0)
|
||||
CP_XML_NODE(L"patternFill")
|
||||
{
|
||||
CP_XML_NODE(L"fgColor")
|
||||
{
|
||||
if (foreFillInfo_.enabled)
|
||||
{
|
||||
switch(foreFillInfo_.xclrType)
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
if (foreFillInfo_.icv < 64)
|
||||
CP_XML_ATTR(L"indexed", foreFillInfo_.icv); break;
|
||||
case 2://rgb
|
||||
CP_XML_ATTR(L"rgb", STR::toARGB(foreFillInfo_.xclrValue)); break;
|
||||
case 3://theme color
|
||||
CP_XML_ATTR(L"theme", foreFillInfo_.xclrValue/* + 1*/);
|
||||
CP_XML_ATTR(L"tint", foreFillInfo_.nTintShade / 32767.0); break;
|
||||
case 4://not set
|
||||
break;
|
||||
}
|
||||
}else
|
||||
CP_XML_ATTR(L"indexed", icvFore);
|
||||
if (fls < 0 || fls > 18)
|
||||
fls = 1;
|
||||
|
||||
}
|
||||
CP_XML_NODE(L"bgColor")
|
||||
CP_XML_ATTR(L"patternType", PatternType[fls]);
|
||||
|
||||
if (fls > 0)
|
||||
{
|
||||
if (backFillInfo_.enabled)
|
||||
CP_XML_NODE(L"fgColor")
|
||||
{
|
||||
switch(backFillInfo_.xclrType)
|
||||
if (foreFillInfo_.enabled)
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
if (backFillInfo_.icv < 64)
|
||||
CP_XML_ATTR(L"indexed", backFillInfo_.icv); break;
|
||||
case 2://rgb
|
||||
CP_XML_ATTR(L"rgb", STR::toARGB(backFillInfo_.xclrValue)); break;
|
||||
case 3://theme color
|
||||
CP_XML_ATTR(L"theme", backFillInfo_.xclrValue /*+ 1*/);
|
||||
CP_XML_ATTR(L"tint", backFillInfo_.nTintShade / 32767.0); break;
|
||||
case 4://not set
|
||||
break;
|
||||
}
|
||||
switch(foreFillInfo_.xclrType)
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
if (foreFillInfo_.icv < 64)
|
||||
CP_XML_ATTR(L"indexed", foreFillInfo_.icv); break;
|
||||
case 2://rgb
|
||||
CP_XML_ATTR(L"rgb", STR::toARGB(foreFillInfo_.xclrValue)); break;
|
||||
case 3://theme color
|
||||
CP_XML_ATTR(L"theme", foreFillInfo_.xclrValue/* + 1*/);
|
||||
CP_XML_ATTR(L"tint", foreFillInfo_.nTintShade / 32767.0); break;
|
||||
case 4://not set
|
||||
break;
|
||||
}
|
||||
}else
|
||||
CP_XML_ATTR(L"indexed", icvFore);
|
||||
|
||||
}
|
||||
else
|
||||
CP_XML_ATTR(L"indexed", icvBack);
|
||||
CP_XML_NODE(L"bgColor")
|
||||
{
|
||||
if (backFillInfo_.enabled)
|
||||
{
|
||||
switch(backFillInfo_.xclrType)
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
if (backFillInfo_.icv < 64)
|
||||
CP_XML_ATTR(L"indexed", backFillInfo_.icv); break;
|
||||
case 2://rgb
|
||||
CP_XML_ATTR(L"rgb", STR::toARGB(backFillInfo_.xclrValue)); break;
|
||||
case 3://theme color
|
||||
CP_XML_ATTR(L"theme", backFillInfo_.xclrValue /*+ 1*/);
|
||||
CP_XML_ATTR(L"tint", backFillInfo_.nTintShade / 32767.0); break;
|
||||
case 4://not set
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
CP_XML_ATTR(L"indexed", icvBack);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ struct FillInfo
|
||||
FillInfoExt foreFillInfo_;
|
||||
FillInfoExt backFillInfo_;
|
||||
|
||||
|
||||
std::wstring ext;
|
||||
};
|
||||
|
||||
struct BorderInfo
|
||||
|
||||
@ -154,7 +154,7 @@ void CellXF::load(CFRecord& record)
|
||||
|
||||
void CellXF::RegisterFillBorder()
|
||||
{
|
||||
for (int i = 0; i < ext_props.size(); i++ )
|
||||
for (size_t i = 0; i < ext_props.size(); i++ )
|
||||
{
|
||||
ExtProp* ext_prop = dynamic_cast<ExtProp*>(ext_props[i].get());
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ void ChartParsedFormula::load(CFRecord& record)
|
||||
|
||||
bool ChartParsedFormula::inRange(const CellRef & ref)
|
||||
{
|
||||
for (int i = 0 ; i < cell_ranges.size(); i++)
|
||||
for (size_t i = 0 ; i < cell_ranges.size(); i++)
|
||||
{
|
||||
if (cell_ranges[i].inRange(ref))
|
||||
{
|
||||
|
||||
@ -46,6 +46,11 @@ BiffStructurePtr ExtProp::clone()
|
||||
void ExtProp::load(CFRecord& record)
|
||||
{
|
||||
record >> extType >> cb;
|
||||
|
||||
if ((int)(cb - 4) > (int)(record.getDataSize() - record.getRdPtr()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
switch(extType)
|
||||
{
|
||||
case 0x0004:
|
||||
|
||||
@ -78,7 +78,7 @@ void OfficeArtDgContainer::loadFields(XLS::CFRecord& record)
|
||||
{
|
||||
}
|
||||
|
||||
for (int i = 0 ; i < child_records.size(); i++)
|
||||
for (size_t i = 0 ; i < child_records.size(); i++)
|
||||
{
|
||||
switch(child_records[i]->rh_own.recType)
|
||||
{
|
||||
@ -87,7 +87,7 @@ void OfficeArtDgContainer::loadFields(XLS::CFRecord& record)
|
||||
OfficeArtDgContainer * dg = dynamic_cast<OfficeArtDgContainer *>(child_records[i].get());
|
||||
if (dg)
|
||||
{
|
||||
for (int i = 0 ; i < dg->child_records.size(); i++)
|
||||
for (size_t i = 0 ; i < dg->child_records.size(); i++)
|
||||
{
|
||||
child_records.push_back(dg->child_records[i]);
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ namespace ODRAW
|
||||
//shift for all trailing zeros
|
||||
std::bitset<sizeof(int)*8> bits( mask );
|
||||
|
||||
for ( unsigned int i = 0; i < bits.size(); i++ )
|
||||
for ( size_t i = 0; i < bits.size(); i++ )
|
||||
{
|
||||
if ( !bits[i] )
|
||||
{
|
||||
|
||||
@ -73,7 +73,7 @@ void OfficeArtDggContainer::loadFields(XLS::CFRecord& record)
|
||||
{
|
||||
OfficeArtContainer::loadFields(record);
|
||||
|
||||
for (int i = 0 ; i < child_records.size(); i++)
|
||||
for (size_t i = 0 ; i < child_records.size(); i++)
|
||||
{
|
||||
switch(child_records[i]->rh_own.recType)
|
||||
{
|
||||
@ -111,7 +111,7 @@ void OfficeArtSpgrContainer::loadFields(XLS::CFRecord& record)
|
||||
{
|
||||
OfficeArtContainer::loadFields(record);
|
||||
|
||||
//for (int i = 0 ; i < child_records.size(); i++)
|
||||
//for (size_t i = 0 ; i < child_records.size(); i++)
|
||||
//{
|
||||
// switch(child_records[i]->rh_own.recType)
|
||||
// {
|
||||
@ -128,7 +128,7 @@ void OfficeArtSpContainer::loadFields(XLS::CFRecord& record)
|
||||
{
|
||||
OfficeArtContainer::loadFields(record);
|
||||
|
||||
for (int i = 0 ; i < child_records.size(); i++)
|
||||
for (size_t i = 0 ; i < child_records.size(); i++)
|
||||
{
|
||||
switch(child_records[i]->rh_own.recType)
|
||||
{
|
||||
|
||||
@ -31,7 +31,9 @@
|
||||
*/
|
||||
|
||||
#include "StyleXF.h"
|
||||
#include "XFProps.h"
|
||||
#include "ExtProp.h"
|
||||
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
@ -139,85 +141,100 @@ void StyleXF::load(CFRecord& record)
|
||||
fill.icvFore = GETBITS(flags4, 0, 6);
|
||||
fill.icvBack = GETBITS(flags4, 7, 13);
|
||||
}
|
||||
|
||||
}
|
||||
void StyleXF::Update(ExtProp* ext_prop)
|
||||
{
|
||||
if (!ext_prop) return;
|
||||
|
||||
switch(ext_prop->extType)
|
||||
{
|
||||
case 0x0004:
|
||||
{
|
||||
fill.foreFillInfo_.enabled = true;
|
||||
fill.foreFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
fill.foreFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
fill.foreFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
fill.foreFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0005:
|
||||
{
|
||||
fill.backFillInfo_.enabled = true;
|
||||
fill.backFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
fill.backFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
fill.backFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
fill.backFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0007:
|
||||
{
|
||||
border.topFillInfo_.enabled = true;
|
||||
border.topFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.topFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.topFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.topFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0008:
|
||||
{
|
||||
border.bottomFillInfo_.enabled = true;
|
||||
border.bottomFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.bottomFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.bottomFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.bottomFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0009:
|
||||
{
|
||||
border.leftFillInfo_.enabled = true;
|
||||
border.leftFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.leftFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.leftFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.leftFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x000A:
|
||||
{
|
||||
border.rightFillInfo_.enabled = true;
|
||||
border.rightFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.rightFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.rightFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.rightFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
//case 0x000B: //diag color
|
||||
//case 0x000C: //diag color
|
||||
case 0x000D:
|
||||
{
|
||||
font_color.enabled = true;
|
||||
font_color.icv = ext_prop->extPropData.color.icv;
|
||||
font_color.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
font_color.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
font_color.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
//case 0x0006:
|
||||
// extPropData.gradient_fill.toXML(own_tag);
|
||||
// break;
|
||||
case 0x000E:
|
||||
{
|
||||
font_id = ext_prop->extPropData.font_scheme;
|
||||
}break;
|
||||
case 0x000F:
|
||||
{
|
||||
cIndent = ext_prop->extPropData.indent_level;
|
||||
}break;
|
||||
}
|
||||
}
|
||||
void StyleXF::Update(XFProps* xfProps)
|
||||
{
|
||||
if (!xfProps) return;
|
||||
|
||||
std::wstringstream strm;
|
||||
xfProps->serialize_fill(strm);
|
||||
fill.ext = strm.str();
|
||||
}
|
||||
void StyleXF::RegisterFillBorder()
|
||||
{
|
||||
for (int i = 0; i < ext_props.size(); i++ )
|
||||
for (size_t i = 0; i < ext_props.size(); i++ )
|
||||
{
|
||||
ExtProp* ext_prop = dynamic_cast<ExtProp*>(ext_props[i].get());
|
||||
Update (ext_prop);
|
||||
}
|
||||
|
||||
switch(ext_prop->extType)
|
||||
{
|
||||
case 0x0004:
|
||||
{
|
||||
fill.foreFillInfo_.enabled = true;
|
||||
fill.foreFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
fill.foreFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
fill.foreFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
fill.foreFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0005:
|
||||
{
|
||||
fill.backFillInfo_.enabled = true;
|
||||
fill.backFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
fill.backFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
fill.backFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
fill.backFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0007:
|
||||
{
|
||||
border.topFillInfo_.enabled = true;
|
||||
border.topFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.topFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.topFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.topFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0008:
|
||||
{
|
||||
border.bottomFillInfo_.enabled = true;
|
||||
border.bottomFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.bottomFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.bottomFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.bottomFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x0009:
|
||||
{
|
||||
border.leftFillInfo_.enabled = true;
|
||||
border.leftFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.leftFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.leftFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.leftFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
case 0x000A:
|
||||
{
|
||||
border.rightFillInfo_.enabled = true;
|
||||
border.rightFillInfo_.icv = ext_prop->extPropData.color.icv;
|
||||
border.rightFillInfo_.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
border.rightFillInfo_.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
border.rightFillInfo_.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
}break;
|
||||
//case 0x000B: //diag color
|
||||
//case 0x000C: //diag color
|
||||
case 0x000D:
|
||||
font_color.enabled = true;
|
||||
font_color.icv = ext_prop->extPropData.color.icv;
|
||||
font_color.xclrType = ext_prop->extPropData.color.xclrType;
|
||||
font_color.nTintShade = ext_prop->extPropData.color.nTintShade;
|
||||
font_color.xclrValue = ext_prop->extPropData.color.xclrValue;
|
||||
break;
|
||||
//case 0x0006:
|
||||
// extPropData.gradient_fill.toXML(own_tag);
|
||||
// break;
|
||||
case 0x000E:
|
||||
font_id = ext_prop->extPropData.font_scheme;
|
||||
break;
|
||||
case 0x000F:
|
||||
cIndent = ext_prop->extPropData.indent_level;
|
||||
break;
|
||||
}
|
||||
}
|
||||
border_x_id = m_GlobalWorkbookInfo->RegisterBorderId(border);
|
||||
fill_x_id = m_GlobalWorkbookInfo->RegisterFillId(fill);
|
||||
|
||||
|
||||
@ -36,8 +36,10 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class XFProps;
|
||||
class ExtProp;
|
||||
class CFRecord;
|
||||
|
||||
class GlobalWorkbookInfo;
|
||||
typedef boost::shared_ptr<GlobalWorkbookInfo> GlobalWorkbookInfoPtr;
|
||||
|
||||
@ -50,13 +52,15 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
GlobalWorkbookInfoPtr m_GlobalWorkbookInfo;
|
||||
|
||||
static const ElementType type = typeStyleXF;
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
void Update(ExtProp* extProp); // xls style
|
||||
void Update(XFProps* xfProps); //xlsx style
|
||||
|
||||
void RegisterFillBorder();
|
||||
|
||||
unsigned char alc;
|
||||
|
||||
@ -70,12 +70,13 @@ int XFPropColor::serialize(std::wostream & stream)
|
||||
{
|
||||
case 0: CP_XML_ATTR(L"auto", 1); break;
|
||||
case 1: CP_XML_ATTR(L"indexed", icv); break;
|
||||
case 2: CP_XML_ATTR(L"rgb", dwRgba.strRGB); break;
|
||||
case 3: CP_XML_ATTR(L"theme", icv); break;
|
||||
case 2:
|
||||
case 3: CP_XML_ATTR(L"rgb", dwRgba.strRGB); break;
|
||||
//CP_XML_ATTR(L"theme", icv); break;
|
||||
}
|
||||
if (nTintShade != 0)
|
||||
{
|
||||
CP_XML_ATTR(L"tint", nTintShade);
|
||||
CP_XML_ATTR(L"tint", nTintShade/ 32767.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,15 +110,68 @@ void XFProps::load(CFRecord& record)
|
||||
}
|
||||
}
|
||||
}
|
||||
int XFProps::serialize(std::wostream & stream, bool dxf)
|
||||
|
||||
int XFProps::serialize_fill(std::wostream & stream)
|
||||
{
|
||||
if (arXFPropFill.empty()) return 0;
|
||||
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
XFProp *pPatternType = NULL;
|
||||
XFPropGradient *pGradient = NULL;
|
||||
|
||||
for (size_t i = 0; i < arXFPropFill.size(); i++)
|
||||
{
|
||||
switch(arXFPropFill[i].xfPropType)
|
||||
{
|
||||
case 1:
|
||||
case 0: pPatternType = &arXFPropFill[i]; break;
|
||||
case 3: pGradient = dynamic_cast<XFPropGradient*>(arXFPropFill[i].xfPropDataBlob.get()); break;
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"fill")
|
||||
{
|
||||
if (pGradient || arXFPropGradient.size() > 0)
|
||||
{
|
||||
CP_XML_NODE(L"gradientFill")
|
||||
{
|
||||
if (pGradient)
|
||||
pGradient->serialize_attr(CP_GET_XML_NODE());
|
||||
|
||||
for (size_t i = 0 ; i < arXFPropGradient.size(); i++)
|
||||
{
|
||||
if (arXFPropGradient[i].xfPropDataBlob == NULL) continue;
|
||||
arXFPropGradient[i].xfPropDataBlob->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pPatternType)
|
||||
{
|
||||
CP_XML_NODE(L"patternFill")
|
||||
{
|
||||
pPatternType->serialize_attr(CP_GET_XML_NODE());
|
||||
|
||||
for (size_t i = 0; i < arXFPropFill.size(); i++)
|
||||
{
|
||||
arXFPropFill[i].serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int XFProps::serialize(std::wostream & strm, bool dxf)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
if (arXFPropFont.size() > 0)
|
||||
{
|
||||
CP_XML_NODE(L"font")
|
||||
{
|
||||
for (int i = 0; i < arXFPropFont.size(); i++)
|
||||
for (size_t i = 0; i < arXFPropFont.size(); i++)
|
||||
{
|
||||
arXFPropFont[i].serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -128,7 +181,7 @@ int XFProps::serialize(std::wostream & stream, bool dxf)
|
||||
{
|
||||
CP_XML_NODE(L"numFmt")
|
||||
{
|
||||
for (int i = 0; i < arXFPropNumFmt.size(); i++)
|
||||
for (size_t i = 0; i < arXFPropNumFmt.size(); i++)
|
||||
{
|
||||
if (dxf)
|
||||
{
|
||||
@ -141,54 +194,13 @@ int XFProps::serialize(std::wostream & stream, bool dxf)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (arXFPropFill.size() > 0)
|
||||
{
|
||||
XFProp pPatternType;
|
||||
XFPropGradient *pGradient = NULL;
|
||||
serialize_fill(strm);
|
||||
|
||||
for (int i = 0; i < arXFPropFill.size(); i++)
|
||||
{
|
||||
switch(arXFPropFill[i].xfPropType)
|
||||
{
|
||||
case 0: pPatternType = arXFPropFill[i]; break;
|
||||
case 3: pGradient = dynamic_cast<XFPropGradient*>(arXFPropFill[i].xfPropDataBlob.get()); break;
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"fill")
|
||||
{
|
||||
if (pGradient || arXFPropGradient.size()>0)
|
||||
{
|
||||
CP_XML_NODE(L"gradientFill")
|
||||
{
|
||||
if (pGradient)
|
||||
pGradient->serialize_attr(CP_GET_XML_NODE());
|
||||
|
||||
for (int i = 0 ; i < arXFPropGradient.size(); i++)
|
||||
{
|
||||
if (arXFPropGradient[i].xfPropDataBlob == NULL) continue;
|
||||
arXFPropGradient[i].xfPropDataBlob->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_NODE(L"patternFill")
|
||||
{
|
||||
pPatternType.serialize_attr(CP_GET_XML_NODE());
|
||||
|
||||
for (int i = 0; i < arXFPropFill.size(); i++)
|
||||
{
|
||||
arXFPropFill[i].serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (arXFPropAlignment.size() > 0)
|
||||
{
|
||||
CP_XML_NODE(L"alignment")
|
||||
{
|
||||
for (int i = 0; i < arXFPropAlignment.size(); i++)
|
||||
for (size_t i = 0; i < arXFPropAlignment.size(); i++)
|
||||
{
|
||||
arXFPropAlignment[i].serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -205,7 +217,7 @@ int XFProps::serialize(std::wostream & stream, bool dxf)
|
||||
if (arXFPropBorder.bottom) arXFPropBorder.bottom->serialize(CP_XML_STREAM());
|
||||
|
||||
//----------------------------------------
|
||||
for (int i = 0; i < arXFPropBorder.other.size(); i++)
|
||||
for (size_t i = 0; i < arXFPropBorder.other.size(); i++)
|
||||
{
|
||||
arXFPropBorder.other[i].serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffStructure.h"
|
||||
#include "../Biff_structures/XFProp.h"
|
||||
#include "XFProp.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -47,13 +47,14 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
static const ElementType type = typeXFProps;
|
||||
|
||||
unsigned short cprops;
|
||||
|
||||
int serialize(std::wostream & stream){ return serialize(stream, false) ; }
|
||||
int serialize(std::wostream & stream, bool dxf);
|
||||
|
||||
int serialize_fill(std::wostream & stream);
|
||||
|
||||
std::vector<XFProp> arXFPropFont;
|
||||
std::vector<XFProp> arXFPropNumFmt;
|
||||
|
||||
@ -112,7 +112,7 @@ int XLUnicodeRichExtendedString::serialize (std::wostream & _stream)
|
||||
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
for (int i = 0 ; i < rgRun.size(); i++)
|
||||
for (size_t i = 0 ; i < rgRun.size(); i++)
|
||||
{
|
||||
CP_XML_NODE(L"r")
|
||||
{
|
||||
|
||||
@ -116,7 +116,7 @@ const bool AUTOFILTER::loadContent(BinProcessor& proc)
|
||||
std::vector<BaseObjectPtr> ar;
|
||||
ar.push_back(elements_.back());
|
||||
|
||||
m_mapFilters12.insert(std::pair<int, std::vector<BaseObjectPtr>>(ind, ar));
|
||||
m_mapFilters12.insert(std::make_pair(ind, ar));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,7 +187,7 @@ int AUTOFILTER::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"ref", ref);
|
||||
|
||||
for (int i = 0 ; i < m_arFilters.size(); i++)//todooo сделать на оставшиеся - count_columns (hidden)
|
||||
for (size_t i = 0 ; i < m_arFilters.size(); i++)//todooo сделать на оставшиеся - count_columns (hidden)
|
||||
{
|
||||
AutoFilter * filter = dynamic_cast<AutoFilter*>(m_arFilters[i].get());
|
||||
CP_XML_NODE(L"filterColumn")
|
||||
@ -214,12 +214,12 @@ int AUTOFILTER::serialize(std::wostream & stream)
|
||||
std::map<int, std::vector<BaseObjectPtr>>::iterator itF = m_mapFilters12.find(filter->iEntry);
|
||||
if (itF != m_mapFilters12.end())
|
||||
{
|
||||
for (int j = 0 ; j < itF->second.size(); j++)
|
||||
for (size_t j = 0 ; j < itF->second.size(); j++)
|
||||
{
|
||||
AutoFilter12* af12 = dynamic_cast<AutoFilter12*>(itF->second[j].get());
|
||||
if (af12 == NULL) continue;
|
||||
|
||||
for (int k = 0 ; k < af12->rgbAF12Criteries.size(); k++)
|
||||
for (size_t k = 0 ; k < af12->rgbAF12Criteries.size(); k++)
|
||||
{
|
||||
AF12Criteria * af12Criteria = dynamic_cast<AF12Criteria *>(af12->rgbAF12Criteries[k].get());
|
||||
if (af12Criteria == NULL) continue;
|
||||
|
||||
@ -225,7 +225,7 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
|
||||
{
|
||||
CatSerRange * iv_CatSerRange = NULL;
|
||||
|
||||
for (int i = 0 ; i < m_arAxes.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arAxes.size(); i++)
|
||||
{
|
||||
IVAXIS * iv = dynamic_cast<IVAXIS*> (m_arAxes[i].get());
|
||||
if (iv)
|
||||
@ -237,7 +237,7 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
|
||||
}
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
for (int i = 0 ; i < m_arAxes.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arAxes.size(); i++)
|
||||
{
|
||||
IVAXIS * iv = dynamic_cast<IVAXIS*> (m_arAxes[i].get());
|
||||
DVAXIS * dv = dynamic_cast<DVAXIS*> (m_arAxes[i].get());
|
||||
@ -263,7 +263,7 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
|
||||
CP_XML_NODE(node_ax_type)
|
||||
{
|
||||
ATTACHEDLABEL *label = NULL;
|
||||
for ( int h = 0 ; h < m_arATTACHEDLABEL.size(); h++)
|
||||
for ( size_t h = 0 ; h < m_arATTACHEDLABEL.size(); h++)
|
||||
{
|
||||
ATTACHEDLABEL *l_= dynamic_cast<ATTACHEDLABEL *> (m_arATTACHEDLABEL[h].get() );
|
||||
|
||||
@ -309,7 +309,7 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
|
||||
// }
|
||||
//}
|
||||
|
||||
for (int j = 0 ; j < m_arAxesId.size(); j++)
|
||||
for (size_t j = 0 ; j < m_arAxesId.size(); j++)
|
||||
{
|
||||
if (m_arAxesId[j].first != m_arAxesId[i].first && m_arAxesId[j].second != 3)
|
||||
{
|
||||
|
||||
@ -104,7 +104,7 @@ void AXISPARENT::concatinate_second (BaseObjectPtr & addit)
|
||||
|
||||
if (second == NULL) return;
|
||||
|
||||
for (int i = 0; i < second->m_arCRT.size(); i++)
|
||||
for (size_t i = 0; i < second->m_arCRT.size(); i++)
|
||||
{
|
||||
CRT* crt = dynamic_cast<CRT*>(second->m_arCRT[i].get());
|
||||
crt->m_indAXISPARENT = 1;
|
||||
|
||||
@ -161,7 +161,7 @@ int AXS::serialize(std::wostream & _stream)
|
||||
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
for (int i = 0 ; i < m_AxisLine_Format.size(); i++)
|
||||
for (size_t i = 0 ; i < m_AxisLine_Format.size(); i++)
|
||||
{
|
||||
std::wstring grid;
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ public:
|
||||
{
|
||||
if (row->miyRw > 0 && std::abs(row->miyRw/20. - sheet_info.defaultRowHeight) > 0.001)
|
||||
{
|
||||
sheet_info.customRowsHeight.insert(std::pair<int, double>(row->rw, row->miyRw / 20.));
|
||||
sheet_info.customRowsHeight.insert(std::make_pair(row->rw, row->miyRw / 20.));
|
||||
}
|
||||
}
|
||||
m_rows.push_back(elements_.front());
|
||||
@ -102,7 +102,7 @@ public:
|
||||
{
|
||||
std::list<BaseObjectPtr> c;
|
||||
c.push_back(elements_.front());
|
||||
m_cells.insert(std::pair<int, std::list<BaseObjectPtr>>(cell->RowNumber, c));
|
||||
m_cells.insert(std::make_pair(cell->RowNumber, c));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -283,7 +283,7 @@ const bool CHARTFORMATS::loadContent(BinProcessor& proc)
|
||||
}
|
||||
BaseObjectPtr CHARTFORMATS::find_label( _UINT16 link_id, unsigned short ex)
|
||||
{
|
||||
for (int i = 0 ; i < m_arATTACHEDLABEL.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arATTACHEDLABEL.size(); i++)
|
||||
{
|
||||
ATTACHEDLABEL * label = dynamic_cast<ATTACHEDLABEL *> (m_arATTACHEDLABEL[i].get());
|
||||
ObjectLink * obj_link = dynamic_cast<ObjectLink *> (label->m_ObjectLink.get());
|
||||
@ -306,7 +306,7 @@ std::vector<std::pair<int, BaseObjectPtr>> CHARTFORMATS::find_labels( _UINT16 li
|
||||
{
|
||||
std::vector<std::pair<int, BaseObjectPtr>> result;
|
||||
|
||||
for (int i = 0 ; i < m_arATTACHEDLABEL.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arATTACHEDLABEL.size(); i++)
|
||||
{
|
||||
ATTACHEDLABEL * label = dynamic_cast<ATTACHEDLABEL *> (m_arATTACHEDLABEL[i].get());
|
||||
ObjectLink * obj_link = dynamic_cast<ObjectLink *> (label->m_ObjectLink.get());
|
||||
|
||||
@ -77,10 +77,10 @@ const bool COLUMNS::loadContent(BinProcessor& proc)
|
||||
|
||||
for (int i = column_info->colFirst; i <= column_info->colLast; i++)
|
||||
{
|
||||
global_info_->sheet_size_info.back().customColumnsWidth.insert(std::pair<int, double>(i, column_info->coldx / 256.));
|
||||
global_info_->sheet_size_info.back().customColumnsWidth.insert(std::make_pair(i, column_info->coldx / 256.));
|
||||
//else if (def_ok)
|
||||
//{
|
||||
// global_info_->sheet_size_info.back().customColumnsWidth.insert(std::pair<int, double>(i, global_info_->sheet_size_info.back().defaultColumnWidth));
|
||||
// global_info_->sheet_size_info.back().customColumnsWidth.insert(std::make_pair(i, global_info_->sheet_size_info.back().defaultColumnWidth));
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ int CONDFMT12::serialize(std::wostream & stream)
|
||||
CP_XML_ATTR(L"sqref", condFmt->mainCF.sqref.strValue);
|
||||
//condition_id
|
||||
//condition_pos
|
||||
for (int i = 0; i < m_arCF12.size(); i++)
|
||||
for (size_t i = 0; i < m_arCF12.size(); i++)
|
||||
{
|
||||
if (m_arCF12[i] == NULL) continue;
|
||||
m_arCF12[i]->serialize(CP_XML_STREAM());
|
||||
|
||||
@ -120,7 +120,7 @@ const bool CONDFMTS::loadContent(BinProcessor& proc)
|
||||
count--;
|
||||
}
|
||||
|
||||
for (int i = 0 ; i < m_arCFEx.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arCFEx.size(); i++)
|
||||
{
|
||||
if (!m_arCFEx[i]) continue;
|
||||
|
||||
@ -129,7 +129,7 @@ const bool CONDFMTS::loadContent(BinProcessor& proc)
|
||||
{
|
||||
int ind_cf = cfEx->content.icf;
|
||||
|
||||
for (int j = 0 ; j < m_arCONDFMT.size(); j++)
|
||||
for (size_t j = 0 ; j < m_arCONDFMT.size(); j++)
|
||||
{
|
||||
CONDFMT * CONDFMT_ = dynamic_cast<CONDFMT *>(m_arCONDFMT[j].get());
|
||||
if (CONDFMT_/* && cfEx->fIsCF12 == 0*/)
|
||||
@ -166,7 +166,7 @@ int CONDFMTS::serialize(std::wostream & stream)
|
||||
{
|
||||
if (m_arCONDFMT.empty()) return 0;
|
||||
|
||||
for (int i = 0 ; i < m_arCONDFMT.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arCONDFMT.size(); i++)
|
||||
{
|
||||
if (!m_arCONDFMT[i]) continue;
|
||||
m_arCONDFMT[i]->serialize(stream);
|
||||
|
||||
@ -112,7 +112,7 @@ int CONDFMT::serialize(std::wostream & stream)
|
||||
CP_XML_ATTR(L"sqref", condFmt->sqref.strValue);
|
||||
//condition_id
|
||||
//condition_pos
|
||||
for (int i = 0; i < m_arCF.size(); i++)
|
||||
for (size_t i = 0; i < m_arCF.size(); i++)
|
||||
{
|
||||
if (m_arCF[i] == NULL) continue;
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ int CUSTOMVIEW::serialize(std::wostream & stream)
|
||||
else
|
||||
CP_XML_ATTR(L"state", L"split");
|
||||
}
|
||||
for (int i = 0; i < m_arSelection.size(); i++)
|
||||
for (size_t i = 0; i < m_arSelection.size(); i++)
|
||||
{
|
||||
if (m_arSelection[i] == NULL) continue;
|
||||
m_arSelection[i]->serialize(CP_XML_STREAM());
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
|
||||
#include "DREF.h"
|
||||
#include <Logic/Biff_records/DConName.h>
|
||||
#include <Logic/Biff_records/DConBin.h>
|
||||
#include <Logic/Biff_records/DConRef.h>
|
||||
#include "../Biff_records/DConName.h"
|
||||
#include "../Biff_records/DConBin.h"
|
||||
#include "../Biff_records/DConRef.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -116,11 +116,18 @@ int DREF::serialize(std::wostream & strm)
|
||||
}
|
||||
else if(ref)
|
||||
{
|
||||
ref->check_external();
|
||||
|
||||
CP_XML_ATTR(L"type", L"worksheet");
|
||||
CP_XML_NODE(L"worksheetSource")
|
||||
{
|
||||
CP_XML_ATTR(L"ref", ref->ref.toString());
|
||||
CP_XML_ATTR(L"sheet", ref->stFile);
|
||||
CP_XML_ATTR(L"sheet", ref->sheet_name);
|
||||
|
||||
if (ref->index_external >= 0)
|
||||
{
|
||||
CP_XML_ATTR(L"r:id", L"extId" + std::to_wstring(ref->index_external + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Logic/CompositeObject.h>
|
||||
#include "../CompositeObject.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -88,7 +88,7 @@ int DVAL::serialize(std::wostream & stream)
|
||||
|
||||
DVal * dval = dynamic_cast<DVal*>(m_DVal.get());
|
||||
|
||||
for (int i = 0 ; i < m_arDv.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arDv.size(); i++)
|
||||
{
|
||||
if (!m_arDv[i]) continue;
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@ const bool FDB::loadContent(BinProcessor& proc)
|
||||
return true;
|
||||
}
|
||||
|
||||
int FDB::serialize(std::wostream & strm, bool bSql)
|
||||
int FDB::serialize(std::wostream & strm, bool bSql, bool bDBB)
|
||||
{
|
||||
SXFDB* fdb = dynamic_cast<SXFDB*>(m_SXFDB.get());
|
||||
SXFDBType* fdb_type = dynamic_cast<SXFDBType*>(m_SXFDBType.get());
|
||||
@ -227,7 +227,7 @@ int FDB::serialize(std::wostream & strm, bool bSql)
|
||||
Formula->serialize_attr(CP_GET_XML_NODE());
|
||||
}
|
||||
|
||||
if (m_arSRCSXOPER.empty() == false)
|
||||
if (!m_arSRCSXOPER.empty() && (bDBB || (!bDBB && bSql)) )
|
||||
{
|
||||
CP_XML_NODE(L"sharedItems")
|
||||
{
|
||||
@ -250,19 +250,26 @@ int FDB::serialize(std::wostream & strm, bool bSql)
|
||||
// }
|
||||
//}
|
||||
|
||||
if ((bDate & bNumber) || (bNumber & bString))
|
||||
if ((bDate & bNumber)/* || (bNumber & bString & !bEmpty & !bInteger)*/)
|
||||
{
|
||||
CP_XML_ATTR(L"containsSemiMixedTypes", 1);
|
||||
}
|
||||
else if ((bDate & bString) || (bEmpty & bInteger & bString))
|
||||
else if ((bString && bDate) ||
|
||||
(bString && (bNumber || bInteger)) ||
|
||||
(!bString && bDate && bEmpty && (bNumber || bInteger)))
|
||||
{
|
||||
if (bEmpty && bInteger)
|
||||
bNumber = true;
|
||||
CP_XML_ATTR(L"containsMixedTypes", 1);
|
||||
|
||||
if (bString && !bNumber && bInteger) bNumber = true;
|
||||
else if (bString && bNumber && bInteger) bInteger = false;
|
||||
}
|
||||
else if (!bEmpty && !bString && !bBool)
|
||||
{
|
||||
CP_XML_ATTR(L"containsSemiMixedTypes", 0);
|
||||
if (bDate)
|
||||
{
|
||||
CP_XML_ATTR(L"containsMixedTypes", 1);
|
||||
}
|
||||
}
|
||||
if (bDate && ! (bNumber || bInteger || bString || bEmpty ))
|
||||
{
|
||||
@ -343,5 +350,25 @@ int FDB::serialize(std::wostream & strm, bool bSql)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int FDB::serialize_record(std::wostream & strm)
|
||||
{
|
||||
SXFDB* fdb = dynamic_cast<SXFDB*>(m_SXFDB.get());
|
||||
SXFDBType* fdb_type = dynamic_cast<SXFDBType*>(m_SXFDBType.get());
|
||||
|
||||
if (!fdb || !fdb_type) return 0;
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"r")
|
||||
{
|
||||
for (size_t i = 0; i < m_arSRCSXOPER.size(); i++)
|
||||
{
|
||||
SXOPER* oper = dynamic_cast<SXOPER*>(m_arSRCSXOPER[i].get());
|
||||
oper->serialize_record(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -47,7 +47,8 @@ public:
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
int serialize(std::wostream & strm, bool bSql);
|
||||
int serialize(std::wostream & strm, bool bSql, bool bDBB);
|
||||
int serialize_record(std::wostream & strm);
|
||||
|
||||
static const ElementType type = typeFDB;
|
||||
|
||||
|
||||
@ -31,18 +31,22 @@
|
||||
*/
|
||||
|
||||
#include "FORMATTING.h"
|
||||
#include <Logic/Biff_records/Font.h>
|
||||
#include <Logic/Biff_records/Format.h>
|
||||
#include <Logic/Biff_records/DXF.h>
|
||||
#include <Logic/Biff_unions/STYLES.h>
|
||||
#include <Logic/Biff_records/Palette.h>
|
||||
#include <Logic/Biff_records/ClrtClient.h>
|
||||
#include <Logic/Biff_records/TableStyles.h>
|
||||
#include <Logic/Biff_records/Compat12.h>
|
||||
#include <Logic/Biff_unions/TABLESTYLES.h>
|
||||
#include <Logic/Biff_unions/XFS.h>
|
||||
#include <Logic/Biff_unions/THEME.h>
|
||||
#include "TABLESTYLES.h"
|
||||
#include "XFS.h"
|
||||
#include "THEME.h"
|
||||
#include "STYLES.h"
|
||||
|
||||
#include "../Biff_records/XF.h"
|
||||
#include "../Biff_records/Font.h"
|
||||
#include "../Biff_records/Format.h"
|
||||
#include "../Biff_records/DXF.h"
|
||||
#include "../Biff_records/Palette.h"
|
||||
#include "../Biff_records/ClrtClient.h"
|
||||
#include "../Biff_records/TableStyles.h"
|
||||
#include "../Biff_records/Compat12.h"
|
||||
|
||||
#include "../Biff_records/Style.h"
|
||||
#include "../Biff_records/StyleExt.h"
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -141,9 +145,53 @@ const bool FORMATTING::loadContent(BinProcessor& proc)
|
||||
elements_.pop_back();
|
||||
}
|
||||
|
||||
update_xfs();
|
||||
|
||||
return true;
|
||||
}
|
||||
void FORMATTING::update_xfs()
|
||||
{
|
||||
STYLES * st = dynamic_cast<STYLES*>(m_Styles.get());
|
||||
XFS * xfs = dynamic_cast<XFS*>(m_XFS.get());
|
||||
|
||||
if (!xfs) return;
|
||||
|
||||
//for (size_t i = 0; (st) && (i < st->m_arStyles.size()); i++)
|
||||
//{
|
||||
// XLS::Style * style = dynamic_cast<Style*>(st->m_arStyles[i].first.get());
|
||||
// XLS::StyleExt * styleExt = dynamic_cast<StyleExt*>(st->m_arStyles[i].second.get());
|
||||
//
|
||||
// if (styleExt && style)
|
||||
// {
|
||||
// if (styleExt->fBuiltIn && styleExt->xfProps.cprops > 0)
|
||||
// {
|
||||
// bool bFound = false;
|
||||
// for (size_t i = 0; i < xfs->m_arCellStyles.size(); i++)
|
||||
// {
|
||||
// XF* xf = dynamic_cast<XF*>(xfs->m_arCellStyles[i].get());
|
||||
|
||||
// if (xf->ind_xf == style->ixfe)
|
||||
// {
|
||||
// xf->style.Update(&styleExt->xfProps);
|
||||
// bFound = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// //for (size_t i = 0; !bFound && i < xfs->m_arCellXFs.size(); i++)
|
||||
// //{
|
||||
// // XF* xf = dynamic_cast<XF*>(xfs->m_arCellXFs[i].get());
|
||||
// // if (xf->ind_xf == style->ixfe)
|
||||
// // {
|
||||
// // xf->cell.Update(&styleExt->xfProps);
|
||||
// // bFound = true;
|
||||
// // break;
|
||||
// // }
|
||||
// //}
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
xfs->RegisterFillBorder();
|
||||
}
|
||||
void FORMATTING::concatinate(FORMATTING* ext)
|
||||
{
|
||||
if (ext->m_XFS)
|
||||
@ -180,7 +228,7 @@ int FORMATTING::serialize1(std::wostream & stream)
|
||||
CP_XML_NODE(L"numFmts")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arFormats.size());
|
||||
for (int i = 0 ; i < m_arFormats.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arFormats.size(); i++)
|
||||
{
|
||||
m_arFormats[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -191,7 +239,7 @@ int FORMATTING::serialize1(std::wostream & stream)
|
||||
CP_XML_NODE(L"fonts")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arFonts.size());
|
||||
for (int i = 0 ; i < m_arFonts.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arFonts.size(); i++)
|
||||
{
|
||||
Font * font = dynamic_cast<Font*>(m_arFonts[i].get());
|
||||
std::map<int, FillInfoExt>::iterator it = global_info->fonts_color_ext.find(i);
|
||||
@ -225,7 +273,7 @@ int FORMATTING::serialize2(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"count", global_info->cellStyleDxfs_count);
|
||||
|
||||
for (int i = 0 ; i < m_arDXF.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arDXF.size(); i++)
|
||||
{
|
||||
m_arDXF[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -53,6 +53,7 @@ public:
|
||||
int serialize2(std::wostream & stream);
|
||||
|
||||
void concatinate(FORMATTING* ext);
|
||||
void update_xfs();
|
||||
|
||||
static const ElementType type = typeFORMATTING;
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ const bool FORMULA::loadContent(BinProcessor& proc)
|
||||
|
||||
if ((formula) && (formula->fShrFmla))
|
||||
{
|
||||
for (int i = 0; i < shared_formulas_locations_ref_.size(); i++)
|
||||
for (size_t i = 0; i < shared_formulas_locations_ref_.size(); i++)
|
||||
{
|
||||
if (shared_formulas_locations_ref_[i].inRange(location)) m_sharedIndex = i;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ const bool LBL::loadContent(BinProcessor& proc)
|
||||
ar[ind_sheet] = value;
|
||||
//ar.push_back(value);
|
||||
|
||||
global_info_->mapDefineNames.insert(std::pair<std::wstring, std::vector<std::wstring>>(name, ar));
|
||||
global_info_->mapDefineNames.insert(std::make_pair(name, ar));
|
||||
}
|
||||
isSerialize = true;
|
||||
}
|
||||
@ -151,7 +151,7 @@ int LBL::serialize(std::wostream & stream)
|
||||
|
||||
if ((lbl->itab == 0) && (res = value.find(L"#REF!")) >= 0)
|
||||
{
|
||||
for (int i = 0 ; i < lbl->rgce.rgce.sequence.size(); i++)
|
||||
for (size_t i = 0 ; i < lbl->rgce.rgce.sequence.size(); i++)
|
||||
{
|
||||
PtgRef3d* ptg = dynamic_cast<PtgRef3d*>(lbl->rgce.rgce.sequence[i].get());
|
||||
if (ptg)
|
||||
|
||||
@ -103,8 +103,6 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
|
||||
|
||||
global_info_->idPivotCache = streamId->idStm;
|
||||
|
||||
global_info_->mapPivotCacheIndex.insert(std::make_pair(global_info_->idPivotCache, global_info_->mapPivotCacheIndex.size()));
|
||||
|
||||
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
|
||||
if (!pivot_cache) return 0;
|
||||
|
||||
@ -113,7 +111,15 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
|
||||
|
||||
if (!db || !db_ex)return 0;
|
||||
|
||||
bool bSql = false;
|
||||
if (pivot_cache->m_arFDB.empty() && pivot_cache->m_arSXFORMULA.empty())
|
||||
{
|
||||
global_info_->mapPivotCacheStream.erase(pFind);
|
||||
return 0;
|
||||
}
|
||||
global_info_->mapPivotCacheIndex.insert(std::make_pair(global_info_->idPivotCache, global_info_->mapPivotCacheIndex.size()));
|
||||
|
||||
SXSRC* src = dynamic_cast<SXSRC*>(m_SXSRC.get());
|
||||
bool bSql = src ? src->bSql : false;
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
@ -122,27 +128,25 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
|
||||
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
|
||||
|
||||
if (pivot_cache->m_arDBB.empty() == false)
|
||||
if (pivot_cache->m_arDBB.empty() && bSql)
|
||||
{
|
||||
CP_XML_ATTR(L"r:id", L"rId1" );
|
||||
CP_XML_ATTR(L"saveData", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_ATTR(L"saveData", 0);
|
||||
CP_XML_ATTR(L"r:id", L"rId1" );
|
||||
}
|
||||
CP_XML_ATTR(L"enableRefresh", 1);
|
||||
CP_XML_ATTR(L"refreshedBy", db->rgb.value());
|
||||
CP_XML_ATTR(L"refreshedDate", db_ex->numDate.data.value);
|
||||
CP_XML_ATTR(L"recordCount", db->crdbdb);
|
||||
//upgradeOnRefresh="1"
|
||||
SXSRC* src = dynamic_cast<SXSRC*>(m_SXSRC.get());
|
||||
|
||||
if (src)
|
||||
{
|
||||
bSql = src->bSql;
|
||||
src->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
if (pivot_cache->m_arFDB.empty() == false)
|
||||
if (!pivot_cache->m_arFDB.empty())
|
||||
{
|
||||
CP_XML_NODE(L"cacheFields")
|
||||
{
|
||||
@ -153,11 +157,11 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
|
||||
FDB *field = dynamic_cast<FDB *>(pivot_cache->m_arFDB[i].get());
|
||||
if (!field) continue;
|
||||
|
||||
field->serialize(CP_XML_STREAM(), bSql);
|
||||
field->serialize(CP_XML_STREAM(), bSql, !pivot_cache->m_arDBB.empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pivot_cache->m_arSXFORMULA.empty() == false)
|
||||
if (!pivot_cache->m_arSXFORMULA.empty())
|
||||
{
|
||||
CP_XML_NODE(L"calculatedItems")
|
||||
{
|
||||
@ -186,7 +190,10 @@ int PIVOTCACHEDEFINITION::serialize_records(std::wostream & strm)
|
||||
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
|
||||
if (!pivot_cache) return 0;
|
||||
|
||||
if (pivot_cache->m_arDBB.empty()) return 0;
|
||||
SXSRC* src = dynamic_cast<SXSRC*>(m_SXSRC.get());
|
||||
bool bSql = src ? src->bSql : false;
|
||||
|
||||
if (pivot_cache->m_arDBB.empty() && bSql) return 0;
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
@ -195,11 +202,22 @@ int PIVOTCACHEDEFINITION::serialize_records(std::wostream & strm)
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
|
||||
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
|
||||
|
||||
CP_XML_ATTR(L"count", pivot_cache->m_arDBB.size());
|
||||
|
||||
for (size_t i = 0; i < pivot_cache->m_arDBB.size(); i++)
|
||||
if (!pivot_cache->m_arDBB.empty())
|
||||
{
|
||||
pivot_cache->m_arDBB[i]->serialize(CP_XML_STREAM());
|
||||
CP_XML_ATTR(L"count", pivot_cache->m_arDBB.size());
|
||||
for (size_t i = 0; i < pivot_cache->m_arDBB.size(); i++)
|
||||
{
|
||||
pivot_cache->m_arDBB[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_ATTR(L"count", pivot_cache->m_arFDB.size());
|
||||
for (size_t i = 0; i < pivot_cache->m_arFDB.size(); i++)
|
||||
{
|
||||
FDB* fdb = dynamic_cast<FDB*>(pivot_cache->m_arFDB[i].get());
|
||||
fdb->serialize_record(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,12 +113,16 @@ int PIVOTVIEW::serialize(std::wostream & strm)
|
||||
|
||||
SXEx *view_ex = pivot_ex ? dynamic_cast<SXEx*>(pivot_ex->m_SXEx.get()) : NULL;
|
||||
SXViewEx9 *view_ex9 = pivot_ex ? dynamic_cast<SXViewEx9*>(frt9->m_SXViewEx9.get()) : NULL;
|
||||
SXAddl_SXCView_SXDVer10Info *view_ex10 = addls ? dynamic_cast<SXAddl_SXCView_SXDVer10Info*>(addls->m_SXAddl_SXCView_SXDTableStyleClient.get()) : NULL;
|
||||
SXAddl_SXCView_SXDVer12Info *view_ex12 = addls ? dynamic_cast<SXAddl_SXCView_SXDVer12Info*>(addls->m_SXAddl_SXCView_SXDTableStyleClient.get()) : NULL;
|
||||
SXAddl_SXCView_SXDVer10Info *view_ex10 = addls ? dynamic_cast<SXAddl_SXCView_SXDVer10Info*>(addls->m_SXAddl_SXCView_SXDVer10Info.get()) : NULL;
|
||||
SXAddl_SXCView_SXDVer12Info *view_ex12 = addls ? dynamic_cast<SXAddl_SXCView_SXDVer12Info*>(addls->m_SXAddl_SXCView_SXDVer12Info.get()) : NULL;
|
||||
|
||||
indexStream = global_info_->arPivotCacheStream[view->iCache];
|
||||
|
||||
std::map<int, int>::iterator pFindIndex = global_info_->mapPivotCacheIndex.find(indexStream);
|
||||
|
||||
if (pFindIndex == global_info_->mapPivotCacheIndex.end())
|
||||
return 0;
|
||||
|
||||
indexCache = pFindIndex->second;
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
@ -162,7 +166,7 @@ int PIVOTVIEW::serialize(std::wostream & strm)
|
||||
CP_XML_ATTR(L"compact", view_ex12->fCompactData);
|
||||
CP_XML_ATTR(L"compactData", view_ex12->fCompactData);
|
||||
|
||||
CP_XML_ATTR(L"gridDropZones", view_ex12->fNewDropZones);
|
||||
CP_XML_ATTR(L"gridDropZones", !view_ex12->fNewDropZones);
|
||||
CP_XML_ATTR(L"showDrill", !view_ex12->fHideDrillIndicators);
|
||||
CP_XML_ATTR(L"printDrill", view_ex12->fPrintDrillIndicators);
|
||||
}
|
||||
@ -190,51 +194,59 @@ int PIVOTVIEW::serialize(std::wostream & strm)
|
||||
CP_XML_ATTR(L"colPageCount", 1);
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"pivotFields")
|
||||
if (!core->m_arPIVOTVD.empty())
|
||||
{
|
||||
CP_XML_ATTR(L"count", view->cDim);//Sxvd
|
||||
for (size_t i = 0; i < core->m_arPIVOTVD.size(); i++)
|
||||
CP_XML_NODE(L"pivotFields")
|
||||
{
|
||||
core->m_arPIVOTVD[i]->serialize(CP_XML_STREAM());
|
||||
CP_XML_ATTR(L"count", view->cDim);//Sxvd
|
||||
for (size_t i = 0; i < core->m_arPIVOTVD.size(); i++)
|
||||
{
|
||||
core->m_arPIVOTVD[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (core->m_arPIVOTIVD.size() >= 1)
|
||||
int index_ivd = 0;
|
||||
int index_tli = 0;
|
||||
|
||||
if (view->cDimRw > 0 && index_ivd < core->m_arPIVOTIVD.size())
|
||||
{
|
||||
CP_XML_NODE(L"rowFields")
|
||||
{
|
||||
CP_XML_ATTR(L"count", view->cDimRw);
|
||||
|
||||
PIVOTIVD* ivd = dynamic_cast<PIVOTIVD*>(core->m_arPIVOTIVD[0].get());
|
||||
PIVOTIVD* ivd = dynamic_cast<PIVOTIVD*>(core->m_arPIVOTIVD[index_ivd].get());
|
||||
ivd->serialize(CP_XML_STREAM());
|
||||
index_ivd++;
|
||||
}
|
||||
}
|
||||
if (core->m_arPIVOTLI.size() >= 1)//0 or 2
|
||||
if (view->cRw > 0 && index_tli < core->m_arPIVOTLI.size())
|
||||
{
|
||||
CP_XML_NODE(L"rowItems")
|
||||
{
|
||||
CP_XML_ATTR(L"count", view->cRw);
|
||||
|
||||
PIVOTLI* line = dynamic_cast<PIVOTLI*>(core->m_arPIVOTLI[0].get());
|
||||
PIVOTLI* line = dynamic_cast<PIVOTLI*>(core->m_arPIVOTLI[index_tli].get());
|
||||
line->serialize(CP_XML_STREAM());
|
||||
index_tli++;
|
||||
}
|
||||
}
|
||||
if (core->m_arPIVOTIVD.size() == 2)//0 or 2
|
||||
if (view->cDimCol > 0 && index_ivd < core->m_arPIVOTIVD.size())
|
||||
{
|
||||
CP_XML_NODE(L"colFields")
|
||||
{
|
||||
CP_XML_ATTR(L"count", view->cDimCol);
|
||||
|
||||
PIVOTIVD* ivd = dynamic_cast<PIVOTIVD*>(core->m_arPIVOTIVD[1].get());
|
||||
PIVOTIVD* ivd = dynamic_cast<PIVOTIVD*>(core->m_arPIVOTIVD[index_ivd].get());
|
||||
ivd->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
if (core->m_arPIVOTLI.size() == 2)//0 or 2
|
||||
if (view->cCol > 0 && index_tli < core->m_arPIVOTLI.size())
|
||||
{
|
||||
CP_XML_NODE(L"colItems")
|
||||
{
|
||||
CP_XML_ATTR(L"count", view->cCol);
|
||||
|
||||
PIVOTLI* line = dynamic_cast<PIVOTLI*>(core->m_arPIVOTLI[1].get());
|
||||
PIVOTLI* line = dynamic_cast<PIVOTLI*>(core->m_arPIVOTLI[index_tli].get());
|
||||
line->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
@ -247,7 +259,7 @@ int PIVOTVIEW::serialize(std::wostream & strm)
|
||||
core->m_PIVOTPI->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
if (core->m_arSXDI.empty() == false)
|
||||
if (!core->m_arSXDI.empty())
|
||||
{
|
||||
CP_XML_NODE(L"dataFields")
|
||||
{
|
||||
|
||||
@ -86,7 +86,7 @@ int SORTDATA12::serialize(std::wostream & stream)
|
||||
if (info->fCaseSensitive) CP_XML_ATTR(L"caseSensitive", 1);
|
||||
if (info->fAltMethod) CP_XML_ATTR(L"sortMethod", L"stroke");
|
||||
|
||||
for (int i = 0 ; i < info->sortCond12Array.size(); i++)
|
||||
for (size_t i = 0 ; i < info->sortCond12Array.size(); i++)
|
||||
{
|
||||
SortCond12 * sortCond = dynamic_cast<SortCond12 *>(info->sortCond12Array[i].get());
|
||||
if (sortCond == NULL) continue;
|
||||
|
||||
@ -31,8 +31,9 @@
|
||||
*/
|
||||
|
||||
#include "STYLES.h"
|
||||
#include <Logic/Biff_records/Style.h>
|
||||
#include <Logic/Biff_records/StyleExt.h>
|
||||
|
||||
#include "../Biff_records/Style.h"
|
||||
#include "../Biff_records/StyleExt.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -84,6 +85,17 @@ const bool STYLES::loadContent(BinProcessor& proc)
|
||||
{
|
||||
styles_count = proc.repeated<Parenthesis_STYLES_1>(0, 0);
|
||||
|
||||
for (std::list<XLS::BaseObjectPtr>::iterator it = elements_.begin(); it != elements_.end(); it++)
|
||||
{
|
||||
Parenthesis_STYLES_1 * style_1 = dynamic_cast<Parenthesis_STYLES_1*>(it->get());
|
||||
|
||||
if (style_1)
|
||||
{
|
||||
m_arStyles.push_back(std::make_pair(style_1->m_Style, style_1->m_StyleEx));
|
||||
}
|
||||
}
|
||||
elements_.clear();
|
||||
|
||||
if (styles_count > 0) return true;
|
||||
else return false;
|
||||
}
|
||||
@ -98,57 +110,52 @@ int STYLES::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"count", styles_count);
|
||||
|
||||
for (std::list<XLS::BaseObjectPtr>::iterator it = elements_.begin(); it != elements_.end(); it++)
|
||||
for (size_t i = 0; i < m_arStyles.size(); i++)
|
||||
{
|
||||
Parenthesis_STYLES_1 * style_1 = dynamic_cast<Parenthesis_STYLES_1*>(it->get());
|
||||
|
||||
if (style_1)
|
||||
CP_XML_NODE(L"cellStyle")
|
||||
{
|
||||
CP_XML_NODE(L"cellStyle")
|
||||
XLS::Style * style = dynamic_cast<Style*> (m_arStyles[i].first.get());
|
||||
XLS::StyleExt * styleExt = dynamic_cast<StyleExt*> (m_arStyles[i].second.get());
|
||||
|
||||
if (styleExt)
|
||||
{
|
||||
XLS::Style * style = dynamic_cast<Style*> (style_1->m_Style.get());
|
||||
XLS::StyleExt * styleExt = dynamic_cast<StyleExt*>(style_1->m_StyleEx.get());
|
||||
|
||||
if (styleExt)
|
||||
CP_XML_ATTR(L"name", styleExt->stName.value());
|
||||
|
||||
if (styleExt->fBuiltIn)
|
||||
{
|
||||
CP_XML_ATTR(L"name", styleExt->stName.value());
|
||||
|
||||
if (styleExt->fBuiltIn)
|
||||
CP_XML_ATTR(L"builtinId", styleExt->builtInData.istyBuiltIn);
|
||||
|
||||
if (styleExt->builtInData.iLevel > 0 && styleExt->builtInData.iLevel < 255)
|
||||
{
|
||||
CP_XML_ATTR(L"builtinId", styleExt->builtInData.istyBuiltIn);
|
||||
|
||||
if (styleExt->builtInData.iLevel > 0 && styleExt->builtInData.iLevel < 255)
|
||||
{
|
||||
CP_XML_ATTR(L"iLevel", styleExt->builtInData.iLevel);
|
||||
}
|
||||
}
|
||||
|
||||
// for (int i = 0; i < styleExt->xfProps.xfPropArray.size(); i++)
|
||||
//{
|
||||
//}
|
||||
}
|
||||
else if (style)
|
||||
{
|
||||
CP_XML_ATTR(L"name", style->user.value());
|
||||
|
||||
if (style->fBuiltIn)
|
||||
{
|
||||
CP_XML_ATTR(L"builtinId", style->builtInData.istyBuiltIn);
|
||||
if (style->builtInData.iLevel > 0 && style->builtInData.iLevel < 255)
|
||||
{
|
||||
CP_XML_ATTR(L"iLevel", style->builtInData.iLevel);
|
||||
}
|
||||
CP_XML_ATTR(L"iLevel", styleExt->builtInData.iLevel);
|
||||
}
|
||||
}
|
||||
|
||||
if (style)
|
||||
// for (size_t i = 0; i < styleExt->xfProps.xfPropArray.size(); i++)
|
||||
//{
|
||||
//}
|
||||
}
|
||||
else if (style)
|
||||
{
|
||||
CP_XML_ATTR(L"name", style->user.value());
|
||||
|
||||
if (style->fBuiltIn)
|
||||
{
|
||||
int xfId = style->ixfe - 1;
|
||||
if (xfId < 0) xfId = 0;
|
||||
|
||||
CP_XML_ATTR(L"xfId", xfId);
|
||||
CP_XML_ATTR(L"builtinId", style->builtInData.istyBuiltIn);
|
||||
if (style->builtInData.iLevel > 0 && style->builtInData.iLevel < 255)
|
||||
{
|
||||
CP_XML_ATTR(L"iLevel", style->builtInData.iLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (style)
|
||||
{
|
||||
int xfId = style->ixfe - 1;
|
||||
if (xfId < 0) xfId = 0;
|
||||
|
||||
CP_XML_ATTR(L"xfId", xfId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of STYLES union of records
|
||||
class STYLES : public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(STYLES)
|
||||
@ -53,6 +51,8 @@ public:
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
std::vector<std::pair<BaseObjectPtr, BaseObjectPtr>> m_arStyles;
|
||||
|
||||
int styles_count;
|
||||
|
||||
};
|
||||
|
||||
@ -82,7 +82,7 @@ const bool SXOPER::loadContent(BinProcessor& proc)
|
||||
bNumber = !bInteger;
|
||||
node = L"n";
|
||||
if (bInteger)
|
||||
value = std::to_wstring((int)num->num.data.value);
|
||||
value = std::to_wstring((_INT64)num->num.data.value);
|
||||
else
|
||||
value = boost::lexical_cast<std::wstring>(num->num.data.value);
|
||||
}
|
||||
@ -97,9 +97,18 @@ const bool SXOPER::loadContent(BinProcessor& proc)
|
||||
else if(proc.optional<SxErr>())
|
||||
{
|
||||
SxErr* err = dynamic_cast<SxErr*>(elements_.back().get());
|
||||
bNumber = true;
|
||||
bString = true;
|
||||
node = L"e";
|
||||
value = std::to_wstring(err->wbe);
|
||||
switch(err->wbe)
|
||||
{
|
||||
case 0x00: value = L"NULL!"; break;
|
||||
case 0x07: value = L"#DIV/0!"; break;
|
||||
case 0x0F: value = L"#VALUE!"; break;
|
||||
case 0x17: value = L"#REF!"; break;
|
||||
case 0x1D: value = L"#NAME?"; break;
|
||||
case 0x24: value = L"#NUM!"; break;
|
||||
case 0x2A: value = L"#N/A"; break;
|
||||
}
|
||||
}
|
||||
else if(proc.optional<SXString>())
|
||||
{
|
||||
@ -146,5 +155,20 @@ int SXOPER::serialize(std::wostream & strm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SXOPER::serialize_record(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(node)
|
||||
{
|
||||
if (!value.empty() || bString)
|
||||
{
|
||||
CP_XML_ATTR(L"v", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@ public:
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
int serialize(std::wostream & strm);
|
||||
int serialize_record(std::wostream & strm);
|
||||
|
||||
static const ElementType type = typeSXOPER;
|
||||
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
|
||||
#include "SXSRC.h"
|
||||
#include <Logic/Biff_unions/DREF.h>
|
||||
#include <Logic/Biff_unions/SXTBL.h>
|
||||
#include <Logic/Biff_unions/DBQUERY.h>
|
||||
#include "DREF.h"
|
||||
#include "SXTBL.h"
|
||||
#include "DBQUERY.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,12 +31,16 @@
|
||||
*/
|
||||
|
||||
#include "SXTBL.h"
|
||||
#include <Logic/Biff_records/SXTbl.h>
|
||||
#include <Logic/Biff_unions/DREF.h>
|
||||
#include <Logic/Biff_records/SxTbpg.h>
|
||||
#include <Logic/Biff_records/SXTBRGIITM.h>
|
||||
#include <Logic/Biff_records/SXString.h>
|
||||
#include "DREF.h"
|
||||
|
||||
#include "../Biff_records/SXTbl.h"
|
||||
#include "../Biff_records/SxTbpg.h"
|
||||
#include "../Biff_records/SXTBRGIITM.h"
|
||||
#include "../Biff_records/SXString.h"
|
||||
|
||||
#include "../Biff_records/DConName.h"
|
||||
#include "../Biff_records/DConBin.h"
|
||||
#include "../Biff_records/DConRef.h"
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -124,11 +128,99 @@ const bool SXTBL::loadContent(BinProcessor& proc)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
int SXTBL::serialize(std::wostream & stream)
|
||||
int SXTBL::serialize(std::wostream & strm)
|
||||
{
|
||||
if (!m_SXTbl) return 0;
|
||||
|
||||
SXTbl *tbl = dynamic_cast<SXTbl*>(m_SXTbl.get());
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"cacheSource")
|
||||
{
|
||||
CP_XML_ATTR(L"type", L"consolidation");
|
||||
|
||||
CP_XML_NODE(L"consolidation")
|
||||
{
|
||||
CP_XML_NODE(L"pages")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arSXTBRGIITM.size());
|
||||
|
||||
for (size_t i = 0; i < m_arSXTBRGIITM.size(); i++)
|
||||
{
|
||||
SXTBRGIITM * item = dynamic_cast<SXTBRGIITM*>(m_arSXTBRGIITM[i].item.get());
|
||||
|
||||
CP_XML_NODE(L"page")
|
||||
{
|
||||
CP_XML_ATTR(L"count", item->cItems);
|
||||
|
||||
for (size_t j = 0; j < m_arSXTBRGIITM[i].strings.size(); j++)
|
||||
{
|
||||
SXString* str = dynamic_cast<SXString*>(m_arSXTBRGIITM[i].strings[j].get());
|
||||
CP_XML_NODE(L"pageItem")
|
||||
{
|
||||
CP_XML_ATTR(L"name", str->segment.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"rangeSets")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arDREF.size());
|
||||
for (size_t i = 0; i < m_arDREF.size(); i++)
|
||||
{
|
||||
DREF* dref = dynamic_cast<DREF*>(m_arDREF[i].get());
|
||||
|
||||
DConName* name = dynamic_cast<DConName*>(dref->m_DCon.get());
|
||||
DConBin* bin = dynamic_cast<DConBin*>(dref->m_DCon.get());
|
||||
DConRef* ref = dynamic_cast<DConRef*>(dref->m_DCon.get());
|
||||
|
||||
CP_XML_NODE(L"rangeSet")
|
||||
{
|
||||
CP_XML_ATTR(L"i1", i);
|
||||
if (name)
|
||||
{
|
||||
CP_XML_ATTR(L"name", name->stName.value());
|
||||
}
|
||||
if (bin)
|
||||
{
|
||||
switch(bin->nBuiltin)
|
||||
{
|
||||
case 0x0000: CP_XML_ATTR(L"name", L"_xlnm.Consolidate_Area"); break;
|
||||
case 0x0001: CP_XML_ATTR(L"name", L"_xlnm.Auto_Open"); break;
|
||||
case 0x0002: CP_XML_ATTR(L"name", L"_xlnm.Auto_Close"); break;
|
||||
case 0x0003: CP_XML_ATTR(L"name", L"_xlnm.Extract"); break;
|
||||
case 0x0004: CP_XML_ATTR(L"name", L"_xlnm.Database"); break;
|
||||
case 0x0005: CP_XML_ATTR(L"name", L"_xlnm.Criteria"); break;
|
||||
case 0x0006: CP_XML_ATTR(L"name", L"_xlnm.Print_Area"); break;
|
||||
case 0x0007: CP_XML_ATTR(L"name", L"_xlnm.Print_Titles"); break;
|
||||
case 0x0008: CP_XML_ATTR(L"name", L"_xlnm.Recorder"); break;
|
||||
case 0x0009: CP_XML_ATTR(L"name", L"_xlnm.Data_Form"); break;
|
||||
case 0x000a: CP_XML_ATTR(L"name", L"_xlnm.Auto_Activate"); break;
|
||||
case 0x000b: CP_XML_ATTR(L"name", L"_xlnm.Auto_Deactivate"); break;
|
||||
case 0x000c: CP_XML_ATTR(L"name", L"_xlnm.Sheet_Title"); break;
|
||||
case 0x000d: CP_XML_ATTR(L"name", L"_xlnm._FilterDatabase"); break; //??
|
||||
}
|
||||
}
|
||||
if (ref)
|
||||
{
|
||||
ref->check_external();
|
||||
|
||||
CP_XML_ATTR(L"ref", ref->ref.toString());
|
||||
CP_XML_ATTR(L"sheet", ref->sheet_name);
|
||||
|
||||
if (ref->index_external >= 0)
|
||||
{
|
||||
CP_XML_ATTR(L"r:id", L"extId" + std::to_wstring(ref->index_external + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
@ -177,7 +177,7 @@ int WINDOW::serialize(std::wostream & stream)
|
||||
CP_XML_ATTR(L"state", L"split");
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < m_arSelection.size(); i++)
|
||||
for (size_t i = 0; i < m_arSelection.size(); i++)
|
||||
{
|
||||
if (m_arSelection[i] == NULL) continue;
|
||||
m_arSelection[i]->serialize(CP_XML_STREAM());
|
||||
|
||||
@ -115,28 +115,45 @@ const bool XFS::loadContent(BinProcessor& proc)
|
||||
count--;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------
|
||||
return true;
|
||||
}
|
||||
void XFS::RegisterFillBorder()
|
||||
{
|
||||
int first_xf_ext = 0;
|
||||
|
||||
for (_UINT16 i = 0 ; i < m_arCellStyles.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arCellStyles.size(); i++)
|
||||
{
|
||||
XF *xfs = dynamic_cast<XF*>(m_arCellStyles[i].get());
|
||||
XF *xfs = dynamic_cast<XF*>(m_arCellStyles[i].get());
|
||||
|
||||
for (size_t j = first_xf_ext ; j < m_arXFext.size(); j++)
|
||||
{
|
||||
XFExt *ext = dynamic_cast<XFExt*>(m_arXFext[j].get());
|
||||
if (ext->ixfe > i)
|
||||
break;
|
||||
|
||||
if (ext->ixfe == xfs->ind_xf)
|
||||
{
|
||||
xfs->style.ext_props = ext->rgExt;
|
||||
first_xf_ext = j + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
xfs->style.RegisterFillBorder();
|
||||
|
||||
}
|
||||
first_xf_ext = 0;
|
||||
|
||||
for (int i = 0 ; i < m_arCellXFs.size(); i++)
|
||||
for (size_t i = 0 ; i < m_arCellXFs.size(); i++)
|
||||
{
|
||||
XF *xfs = dynamic_cast<XF*>(m_arCellXFs[i].get());
|
||||
XF *xfs = dynamic_cast<XF*>(m_arCellXFs[i].get());
|
||||
|
||||
if (m_arXFext.size() > 0 && xfs->cell.fHasXFExt)
|
||||
if (!m_arXFext.empty() && xfs->cell.fHasXFExt)
|
||||
{
|
||||
for (_UINT16 j = first_xf_ext ; j < m_arXFext.size(); j++)
|
||||
for (size_t j = first_xf_ext ; j < m_arXFext.size(); j++)
|
||||
{
|
||||
XFExt *ext = dynamic_cast<XFExt*>(m_arXFext[j].get());
|
||||
if (ext->ixfe > i)break;
|
||||
if (ext->ixfe > i)
|
||||
break;
|
||||
|
||||
if (ext->ixfe == xfs->ind_xf)
|
||||
{
|
||||
@ -148,8 +165,6 @@ const bool XFS::loadContent(BinProcessor& proc)
|
||||
}
|
||||
xfs->cell.RegisterFillBorder();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
int XFS::serialize(std::wostream & stream)
|
||||
{
|
||||
@ -158,7 +173,7 @@ int XFS::serialize(std::wostream & stream)
|
||||
CP_XML_NODE(L"cellStyleXfs")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arCellStyles.size());
|
||||
for (int i = 0; i < m_arCellStyles.size(); i++)
|
||||
for (size_t i = 0; i < m_arCellStyles.size(); i++)
|
||||
{
|
||||
m_arCellStyles[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
@ -166,7 +181,7 @@ int XFS::serialize(std::wostream & stream)
|
||||
CP_XML_NODE(L"cellXfs")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arCellXFs.size());
|
||||
for (int i = 0; i < m_arCellXFs.size(); i++)
|
||||
for (size_t i = 0; i < m_arCellXFs.size(); i++)
|
||||
{
|
||||
m_arCellXFs[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
@ -51,6 +51,8 @@ public:
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
void RegisterFillBorder();
|
||||
|
||||
static const ElementType type = typeXFS;
|
||||
|
||||
size_t cell_xf_current_id;
|
||||
|
||||
@ -324,6 +324,13 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
|
||||
|
||||
int iCrt = -1;
|
||||
|
||||
if (charts->m_arSERIESFORMAT.empty() && !parent0->m_arCRT.empty())
|
||||
{
|
||||
std::vector<int> ser;
|
||||
m_mapTypeChart.insert(std::make_pair(0, ser));
|
||||
return;
|
||||
}
|
||||
|
||||
for (size_t i = 0 ; i < charts->m_arSERIESFORMAT.size(); i++)
|
||||
{
|
||||
SERIESFORMAT * series = dynamic_cast<SERIESFORMAT *>(charts->m_arSERIESFORMAT[i].get());
|
||||
@ -334,7 +341,7 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
|
||||
if ( serCrt == NULL)
|
||||
{
|
||||
//для доп линий может и не существовать - брать предыдущий - и объеденить!!!
|
||||
std::map<int,std::vector<int>>::iterator it = m_mapTypeChart.find(iCrt);
|
||||
std::unordered_map<int,std::vector<int>>::iterator it = m_mapTypeChart.find(iCrt);
|
||||
if (it != m_mapTypeChart.end())
|
||||
{
|
||||
SERIESFORMAT * series_prev = dynamic_cast<SERIESFORMAT *>(charts->m_arSERIESFORMAT[it->second.back()].get());
|
||||
@ -359,12 +366,12 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
|
||||
|
||||
CRT * crt = dynamic_cast<CRT*>(parent0->m_arCRT[iCrt].get());
|
||||
|
||||
std::map<int,std::vector<int>>::iterator it = m_mapTypeChart.find(iCrt);
|
||||
std::unordered_map<int,std::vector<int>>::iterator it = m_mapTypeChart.find(iCrt);
|
||||
if (it == m_mapTypeChart.end())
|
||||
{
|
||||
std::vector<int> ser;
|
||||
ser.push_back(i);
|
||||
m_mapTypeChart.insert(std::pair<int, std::vector<int>>(iCrt, ser));
|
||||
m_mapTypeChart.insert(std::make_pair(iCrt, ser));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -507,7 +514,7 @@ int ChartSheetSubstream::serialize_3D (std::wostream & _stream)
|
||||
BaseObjectPtr wallSpPr;
|
||||
BaseObjectPtr floorSpPr;
|
||||
|
||||
for (int i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
|
||||
for (size_t i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
|
||||
{
|
||||
AXISPARENT* parent = dynamic_cast<AXISPARENT*> (chart_formats->m_arAXISPARENT[i].get());
|
||||
AxisParent* ax_parent = dynamic_cast<AxisParent*> (parent->m_AxisParent.get());
|
||||
@ -545,11 +552,11 @@ int ChartSheetSubstream::serialize_3D (std::wostream & _stream)
|
||||
CP_XML_ATTR (L"val" , chart3D->anElev);
|
||||
}
|
||||
}
|
||||
if (chart3D->pcHeight != 100)
|
||||
if (chart3D->pcHeight3D != 100 && chart3D->pcHeight3D >= 5 && chart3D->pcHeight3D <= 500)
|
||||
{
|
||||
CP_XML_NODE(L"c:hPercent")
|
||||
{
|
||||
CP_XML_ATTR (L"val" , chart3D->pcHeight);
|
||||
CP_XML_ATTR (L"val" , chart3D->pcHeight3D);
|
||||
}
|
||||
}
|
||||
if (chart3D->anRot != 0)
|
||||
@ -662,7 +669,7 @@ int ChartSheetSubstream::serialize_legend (std::wostream & _stream, const std::w
|
||||
//}
|
||||
|
||||
//todooo разобраться с разными типами в одном чарте .. считать количество серий??
|
||||
std::map< int, std::vector<int>>::iterator it = m_mapTypeChart.begin();
|
||||
std::unordered_map< int, std::vector<int>>::iterator it = m_mapTypeChart.begin();
|
||||
if (it != m_mapTypeChart.end())
|
||||
{
|
||||
CRT * crt = dynamic_cast<CRT*>(parent0->m_arCRT[it->first].get());
|
||||
@ -746,7 +753,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
|
||||
PlotAreaPos->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
for (std::map<int, std::vector<int>>::iterator it = m_mapTypeChart.begin(); it != m_mapTypeChart.end(); it++)
|
||||
for (std::unordered_map<int, std::vector<int>>::iterator it = m_mapTypeChart.begin(); it != m_mapTypeChart.end(); it++)
|
||||
{
|
||||
CRT * crt = dynamic_cast<CRT*>(parent0->m_arCRT[it->first].get());
|
||||
|
||||
@ -871,7 +878,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
|
||||
AXES * axes = dynamic_cast<AXES*>(parent->m_AXES.get());
|
||||
if (axes)
|
||||
{
|
||||
for (int a = 0 ; a < axes->m_arAxesId.size(); a++)
|
||||
for (size_t a = 0 ; a < axes->m_arAxesId.size(); a++)
|
||||
{
|
||||
CP_XML_NODE(L"c:axId")
|
||||
{
|
||||
@ -883,7 +890,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
|
||||
for (size_t i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
|
||||
{
|
||||
AXISPARENT* parent = dynamic_cast<AXISPARENT*> (chart_formats->m_arAXISPARENT[i].get());
|
||||
AxisParent* ax_parent = dynamic_cast<AxisParent*> (parent->m_AxisParent.get());
|
||||
@ -942,7 +949,7 @@ int ChartSheetSubstream::serialize_dPt(std::wostream & _stream, int id, CRT *crt
|
||||
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
for (int i = 0 ; i < series->m_arPtSS.size(); i++)
|
||||
for (size_t i = 0 ; i < series->m_arPtSS.size(); i++)
|
||||
{
|
||||
CP_XML_NODE(L"c:dPt")
|
||||
{
|
||||
@ -962,7 +969,7 @@ int ChartSheetSubstream::serialize_dPt(std::wostream & _stream, int id, CRT *crt
|
||||
CP_XML_ATTR(L"val", series_data_format->xi);
|
||||
|
||||
if (format->fVaried)
|
||||
present_idx.insert(std::pair<int, bool>(series_data_format->xi, true));
|
||||
present_idx.insert(std::make_pair(series_data_format->xi, true));
|
||||
}
|
||||
series_ss->serialize (CP_XML_STREAM(), crt->m_iChartType, series_data_format->xi);
|
||||
series_ss->serialize2 (CP_XML_STREAM(), crt->m_iChartType);
|
||||
@ -1088,7 +1095,7 @@ int ChartSheetSubstream::serialize_dLbls (std::wostream & _stream, int id, CRT *
|
||||
CP_XML_NODE(L"c:showSerName") { CP_XML_ATTR (L"val" , 0); }
|
||||
}
|
||||
//подписи к точкам (отдельные)
|
||||
for (int i = 0; i < labels.size(); i++)
|
||||
for (size_t i = 0; i < labels.size(); i++)
|
||||
{
|
||||
CP_XML_NODE(L"c:dLbl")
|
||||
{
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Logic/CompositeObject.h>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace XLS
|
||||
{;
|
||||
@ -86,7 +87,7 @@ private:
|
||||
void recalc(CHARTFORMATS* charts);
|
||||
void recalc(SERIESDATA* data);
|
||||
|
||||
std::map<int, std::vector<int>> m_mapTypeChart;//тут нужен несортированый .. пока оставим этот
|
||||
std::unordered_map<int, std::vector<int>> m_mapTypeChart;
|
||||
|
||||
GlobalWorkbookInfoPtr pGlobalWorkbookInfo;
|
||||
};
|
||||
|
||||
@ -165,12 +165,12 @@ const size_t GlobalWorkbookInfo::RegisterFillId(const FillInfo& fill)
|
||||
|
||||
void GlobalWorkbookInfo::RegisterFontColorId (int id, const FillInfoExt & font_color)
|
||||
{
|
||||
fonts_color_ext.insert(std::pair<int, FillInfoExt>(id, font_color));
|
||||
fonts_color_ext.insert(std::make_pair(id, font_color));
|
||||
}
|
||||
|
||||
void GlobalWorkbookInfo::RegisterPaletteColor(int id, const std::wstring & rgb)
|
||||
{
|
||||
colors_palette.insert(std::pair<int, std::wstring>(id, rgb));
|
||||
colors_palette.insert(std::make_pair(id, rgb));
|
||||
}
|
||||
|
||||
unsigned int GlobalWorkbookInfo::GenerateAXESId()
|
||||
|
||||
@ -116,7 +116,8 @@ public:
|
||||
|
||||
std::vector<_sx_name> arPivotSxNames;
|
||||
std::vector<std::wstring> arPivotCacheSxNames;
|
||||
std::vector<std::wstring> arPivotCacheReferences;
|
||||
|
||||
std::unordered_map<std::wstring, std::wstring> mapPivotCacheExternal;
|
||||
|
||||
std::map<std::wstring, std::vector<std::wstring>> mapDefineNames;
|
||||
std::vector<std::wstring> arDefineNames;
|
||||
|
||||
@ -491,7 +491,7 @@ void GlobalsSubstream::LoadHFPicture()
|
||||
if (m_arHFPicture.empty()) return;
|
||||
|
||||
int current_size_hf = 0, j = 0;
|
||||
for ( int i = 0; i < m_arHFPicture.size(); i++)
|
||||
for ( size_t i = 0; i < m_arHFPicture.size(); i++)
|
||||
{
|
||||
HFPicture* hf = dynamic_cast<HFPicture*>(m_arHFPicture[i].get());
|
||||
if ((hf) && (hf->recordDrawingGroup))
|
||||
|
||||
@ -63,7 +63,7 @@ PropertySet::PropertySet(XLS::CFStreamPtr stream, const unsigned int property_se
|
||||
}
|
||||
|
||||
code_page = 0;
|
||||
for(unsigned int i = 0; i < prop_offsets.size(); ++i)
|
||||
for(size_t i = 0; i < prop_offsets.size(); ++i)
|
||||
{
|
||||
if (stream->getStreamPointer() - property_set_offset > Size)
|
||||
break;
|
||||
|
||||
@ -467,7 +467,7 @@ void WorksheetSubstream::LoadHFPicture()
|
||||
if (m_arHFPicture.empty()) return;
|
||||
|
||||
int current_size_hf = 0, j = 0;
|
||||
for ( int i = 0; i < m_arHFPicture.size(); i++)
|
||||
for ( size_t i = 0; i < m_arHFPicture.size(); i++)
|
||||
{
|
||||
HFPicture* hf = dynamic_cast<HFPicture*>(m_arHFPicture[i].get());
|
||||
if ((hf) && (hf->recordDrawingGroup))
|
||||
|
||||
@ -200,6 +200,7 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
|
||||
{
|
||||
std::list<std::string> listStream = cfile.storage_->entries("_SX_DB_CUR");
|
||||
|
||||
int last_index = 0;
|
||||
for (std::list<std::string>::iterator it = listStream.begin(); it != listStream.end(); it++)
|
||||
{
|
||||
XLS::CFStreamCacheReader pivot_cache_reader(cfile.getNamedStream("_SX_DB_CUR/" + *it), xls_global_info);
|
||||
@ -208,16 +209,25 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
|
||||
XLS::BinReaderProcessor proc(pivot_cache_reader , pivot_cache.get() , true);
|
||||
proc.mandatory(*pivot_cache.get());
|
||||
|
||||
int index = 0;
|
||||
int index = -1;
|
||||
try
|
||||
{
|
||||
index = atoi(it->c_str());
|
||||
index = boost::lexical_cast<int>(it->c_str());
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
//может быть шестнадцатеричное
|
||||
index = XmlUtils::GetHex(*it);
|
||||
}
|
||||
if (index < 0)
|
||||
index = last_index + 1;
|
||||
|
||||
xls_global_info->mapPivotCacheStream.insert(std::make_pair(index, pivot_cache));
|
||||
|
||||
last_index = index;
|
||||
}
|
||||
}
|
||||
if (bMacros && cfile.storage_->isDirectory("_VBA_PROJECT_CUR"))
|
||||
@ -1947,7 +1957,6 @@ void XlsConverter::convert(XLS::PIVOTVIEW * pivot_view)
|
||||
|
||||
pivot_view->serialize(strm);
|
||||
|
||||
|
||||
int index_view = xlsx_context->get_pivots_context().add_view(strm.str(), pivot_view->indexCache);
|
||||
|
||||
if (index_view > 0)
|
||||
@ -1968,4 +1977,9 @@ void XlsConverter::convert(XLS::PIVOTCACHEDEFINITION * pivot_cached)
|
||||
pivot_cached->serialize_records(strmR);
|
||||
|
||||
xlsx_context->get_pivots_context().add_cache(strmD.str(), strmR.str());
|
||||
|
||||
if (!xls_global_info->mapPivotCacheExternal.empty())
|
||||
{
|
||||
xlsx_context->get_pivots_context().add_cache_external(xls_global_info->mapPivotCacheExternal);
|
||||
}
|
||||
}
|
||||
@ -43,8 +43,12 @@ class xlsx_pivots_context::Impl
|
||||
public:
|
||||
struct _pivot_cache
|
||||
{
|
||||
std::wstring definitionsData_;
|
||||
std::wstring recordsData_;
|
||||
_pivot_cache(const std::wstring & def, const std::wstring & rec) : definitions_(def), records_(rec) {}
|
||||
|
||||
std::wstring definitions_;
|
||||
std::wstring records_;
|
||||
|
||||
std::unordered_map<std::wstring, std::wstring> externals_;
|
||||
};
|
||||
struct _pivot_view
|
||||
{
|
||||
@ -65,9 +69,15 @@ xlsx_pivots_context::xlsx_pivots_context() : impl_(new xlsx_pivots_context::Impl
|
||||
|
||||
void xlsx_pivots_context::add_cache(std::wstring definitions, std::wstring records)
|
||||
{
|
||||
Impl::_pivot_cache c = {definitions, records};
|
||||
if (definitions.empty()) return;
|
||||
|
||||
Impl::_pivot_cache c(definitions, records);
|
||||
impl_->caches_.push_back(c);
|
||||
}
|
||||
void xlsx_pivots_context::add_cache_external(std::unordered_map<std::wstring, std::wstring> &externals)
|
||||
{
|
||||
impl_->caches_.back().externals_ = externals;
|
||||
}
|
||||
|
||||
int xlsx_pivots_context::get_cache_count()
|
||||
{
|
||||
@ -79,12 +89,20 @@ bool xlsx_pivots_context::is_connections()
|
||||
}
|
||||
void xlsx_pivots_context::dump_rels_cache(int index, rels & Rels)
|
||||
{
|
||||
if (impl_->caches_[index].recordsData_.empty() == false)
|
||||
if (impl_->caches_[index].records_.empty() == false)
|
||||
{
|
||||
Rels.add(relationship(L"rId1",
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords",
|
||||
L"pivotCacheRecords" + std::to_wstring(index + 1) + L".xml", L""));
|
||||
}
|
||||
int i = 0;
|
||||
for (std::unordered_map<std::wstring, std::wstring>::iterator it = impl_->caches_[index].externals_.begin();
|
||||
it != impl_->caches_[index].externals_.end(); it++, i++)
|
||||
{
|
||||
Rels.add(relationship(L"extId" + std::to_wstring(i + 1),
|
||||
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",
|
||||
it->second, L"External"));
|
||||
}
|
||||
}
|
||||
void xlsx_pivots_context::dump_rels_view(int index, rels & Rels)
|
||||
{
|
||||
@ -97,7 +115,7 @@ void xlsx_pivots_context::dump_rels_view(int index, rels & Rels)
|
||||
}
|
||||
void xlsx_pivots_context::write_cache_definitions_to(int index, std::wostream & strm)
|
||||
{
|
||||
strm << impl_->caches_[index].definitionsData_;
|
||||
strm << impl_->caches_[index].definitions_;
|
||||
}
|
||||
void xlsx_pivots_context::write_connections_to(std::wostream & strm)
|
||||
{
|
||||
@ -114,7 +132,7 @@ void xlsx_pivots_context::write_connections_to(std::wostream & strm)
|
||||
|
||||
void xlsx_pivots_context::write_cache_records_to(int index, std::wostream & strm)
|
||||
{
|
||||
strm << impl_->caches_[index].recordsData_;
|
||||
strm << impl_->caches_[index].records_;
|
||||
}
|
||||
void xlsx_pivots_context::write_table_view_to(int index, std::wostream & strm)
|
||||
{
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
#include "oox_package.h"
|
||||
#include <unordered_map>
|
||||
|
||||
namespace oox {
|
||||
|
||||
@ -47,6 +48,8 @@ public:
|
||||
int get_view_count();
|
||||
|
||||
void add_cache(std::wstring definitions, std::wstring records);
|
||||
void add_cache_external(std::unordered_map<std::wstring, std::wstring> &externals);
|
||||
|
||||
int get_cache_count();
|
||||
|
||||
void write_cache_definitions_to (int index, std::wostream & strm);
|
||||
|
||||
@ -1,143 +1,146 @@
|
||||
// 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
|
||||
// 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
|
||||
|
||||
@ -1,69 +1,68 @@
|
||||
// 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
|
||||
// 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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,393 +1,420 @@
|
||||
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
|
||||
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
|
||||
|
||||
661
Common/3dParty/cryptopp/GNUmakefile
Normal file → Executable file
661
Common/3dParty/cryptopp/GNUmakefile
Normal file → Executable file
@ -1,104 +1,162 @@
|
||||
# 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
|
||||
###########################################################
|
||||
##### System Attributes and Programs #####
|
||||
###########################################################
|
||||
|
||||
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
|
||||
EGREP ?= egrep
|
||||
|
||||
LN ?= ln -sf
|
||||
LDCONF ?= /sbin/ldconfig -n
|
||||
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_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")
|
||||
|
||||
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")
|
||||
GCC_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "(gcc|g\+\+)")
|
||||
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\+\+)")
|
||||
CLANG_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
|
||||
INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)")
|
||||
INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -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
|
||||
PREFIX = /usr/local
|
||||
endif
|
||||
|
||||
ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
|
||||
# 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)
|
||||
CXX := g++
|
||||
endif
|
||||
|
||||
# We honor ARFLAGS, but the "v" often option used by default causes a noisy make
|
||||
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
|
||||
ifeq ($(ARFLAGS),rv)
|
||||
ARFLAGS = r
|
||||
endif
|
||||
|
||||
ifeq ($(IS_X86),1)
|
||||
###########################################################
|
||||
##### X86/X32/X64 Options #####
|
||||
###########################################################
|
||||
|
||||
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]\.)")
|
||||
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
|
||||
|
||||
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 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)
|
||||
# Add -fPIC for targets *except* X86, X32, Cygwin or MinGW
|
||||
ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS_MINGW)$(SUN_COMPILER),00000)
|
||||
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -fPIC
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Guard use of -march=native
|
||||
ifeq ($(GCC_COMPILER),0)
|
||||
ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10)
|
||||
CXXFLAGS += -march=native
|
||||
else ifneq ($(GCC42_OR_LATER),0)
|
||||
else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00)
|
||||
CXXFLAGS += -march=native
|
||||
else
|
||||
# GCC 3.3 and "unknown option -march="
|
||||
# GCC 4.1 compiler crash with -march=native.
|
||||
ifneq ($(IS_X86_64),0)
|
||||
# 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)
|
||||
CXXFLAGS += -m64
|
||||
else
|
||||
else ifeq ($(SUN_COMPILER)$(IS_X86),01)
|
||||
CXXFLAGS += -m32
|
||||
endif # X86/X32/X64
|
||||
endif
|
||||
|
||||
# Aligned access required at -O3 for GCC due to vectorization (circa 08/2008). Expect other compilers to do the same.
|
||||
# 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)
|
||||
ifeq ($(findstring -O3,$(CXXFLAGS)),-O3)
|
||||
ifneq ($(UNALIGNED_ACCESS),0)
|
||||
ifeq ($(GCC46_OR_LATER),1)
|
||||
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 # GCC 4.6
|
||||
endif # UNALIGNED_ACCESS
|
||||
endif # Vectorization
|
||||
|
||||
ifneq ($(INTEL_COMPILER),0)
|
||||
CXXFLAGS += -wd68 -wd186 -wd279 -wd327 -wd161 -wd3180
|
||||
@ -109,34 +167,100 @@ CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(GCC_COMPILER)$(GAS210_OR_LATER),10) # .intel_syntax wasn't supported until GNU assembler 2.10
|
||||
# .intel_syntax wasn't supported until GNU assembler 2.10
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS210_OR_LATER),100)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
|
||||
else
|
||||
ifeq ($(GCC_COMPILER)$(GAS217_OR_LATER),10)
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS217_OR_LATER),100)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
|
||||
else
|
||||
ifeq ($(GCC_COMPILER)$(GAS219_OR_LATER),10)
|
||||
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS219_OR_LATER),100)
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(IS_SUN),0)
|
||||
CXXFLAGS += -Wa,--divide # allow use of "/" operator
|
||||
# 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
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # IS_X86
|
||||
# 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
|
||||
|
||||
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)
|
||||
@ -144,18 +268,8 @@ 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
|
||||
@ -167,23 +281,35 @@ LDFLAGS += -flat_namespace -undefined suppress -m
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(IS_SUN),0)
|
||||
LDLIBS += -lnsl -lsocket
|
||||
M32OR64 = -m$(shell isainfo -b)
|
||||
endif
|
||||
|
||||
# Add -errtags=yes to get the name for a warning suppression
|
||||
ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler
|
||||
CXXFLAGS ?= -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
|
||||
LDFLAGS =
|
||||
AR = $(CXX)
|
||||
ARFLAGS = -xar -o
|
||||
RANLIB = true
|
||||
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
|
||||
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
|
||||
@ -197,71 +323,72 @@ CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
|
||||
endif # CXXFLAGS
|
||||
endif # UBsan
|
||||
|
||||
# Address Sanitizer (Asan) testing
|
||||
# Address Sanitizer (Asan) testing. Issue 'make asan'.
|
||||
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
|
||||
# LD gold linker testing. Triggered by 'LD=ld.gold'.
|
||||
ifeq ($(findstring ld.gold,$(LD)),ld.gold)
|
||||
ifeq ($(findstring -Wl,-fuse-ld=gold,$(CXXFLAGS)),)
|
||||
ifeq ($(findstring -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)
|
||||
GOLD_OPTION = -Wl,-fuse-ld=gold
|
||||
LDFLAGS += -fuse-ld=gold
|
||||
endif # ELF/ELF64
|
||||
endif # CXXFLAGS
|
||||
endif # Gold
|
||||
|
||||
# Aligned access testing
|
||||
# Aligned access testing. Issue 'make aligned'.
|
||||
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
|
||||
|
||||
# Debug testing on GNU systems
|
||||
# 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
|
||||
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
|
||||
ifeq ($(findstring -D_GLIBCXX_CONCEPT_CHECKS,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -D_GLIBCXX_CONCEPT_CHECKS
|
||||
endif # CXXFLAGS
|
||||
endif # NAS_NEWLIB
|
||||
endif # USING_GLIBCXX
|
||||
endif # GNU Debug build
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# For Shared Objects, Diff, Dist/Zip rules
|
||||
LIB_VER := $(shell $(EGREP) "define CRYPTOPP_VERSION" config.h | cut -d" " -f 3)
|
||||
@ -273,6 +400,56 @@ 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)
|
||||
@ -280,49 +457,82 @@ static: libcryptopp.a
|
||||
shared dynamic dylib: libcryptopp.dylib
|
||||
else
|
||||
static: libcryptopp.a
|
||||
shared dynamic: libcryptopp.so
|
||||
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
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 (missing in config file)
|
||||
# Default directory (in case its missing in the 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 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
|
||||
-$(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
|
||||
ifneq ($(wildcard *.exe.dSYM),)
|
||||
-$(RM) -r *.exe.dSYM/
|
||||
endif
|
||||
ifneq ($(wildcard $(DOCUMENT_DIRECTORY)/),)
|
||||
-$(RM) -r $(DOCUMENT_DIRECTORY)/
|
||||
ifneq ($(wildcard *.dylib.dSYM),)
|
||||
-$(RM) -r *.dylib.dSYM/
|
||||
endif
|
||||
ifneq ($(wildcard cov-int/),)
|
||||
-$(RM) -r cov-int/
|
||||
@ -330,7 +540,18 @@ endif
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt *.o *.ii *.s
|
||||
-$(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
|
||||
ifneq ($(wildcard cryptopp$(LIB_VER)\.*),)
|
||||
-$(RM) cryptopp$(LIB_VER)\.*
|
||||
endif
|
||||
@ -343,47 +564,87 @@ endif
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
$(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
|
||||
$(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
|
||||
endif
|
||||
|
||||
.PHONY: remove uninstall
|
||||
remove uninstall:
|
||||
-$(RM) -r $(PREFIX)/include/cryptopp
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.a
|
||||
-$(RM) $(PREFIX)/bin/cryptest.exe
|
||||
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
-$(RM) -r $(DESTDIR)$(DATADIR)/cryptopp
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.dylib
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
else
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.so
|
||||
-$(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
|
||||
endif
|
||||
|
||||
libcryptopp.a: public_service | $(LIBOBJS)
|
||||
libcryptopp.a: $(LIBOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
ifeq ($(IS_SUN),0)
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
|
||||
libcryptopp.so: public_service | $(LIBOBJS)
|
||||
$(CXX) -shared -o $@ $(CXXFLAGS) $(GOLD_OPTION) $(LIBOBJS) $(LDLIBS)
|
||||
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.dylib: $(LIBOBJS)
|
||||
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" $(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: public_service | libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(GOLD_OPTION) $(LDLIBS)
|
||||
cryptest.exe: libcryptopp.a $(TESTOBJS)
|
||||
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
nolib: $(OBJS) # makes it faster to test changes
|
||||
# Makes it faster to test changes
|
||||
nolib: $(OBJS)
|
||||
$(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
dll: cryptest.import.exe dlltest.exe
|
||||
@ -393,7 +654,9 @@ 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)
|
||||
@ -401,36 +664,58 @@ 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 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/
|
||||
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/
|
||||
|
||||
ifeq ($(wildcard Filelist.txt),Filelist.txt)
|
||||
DIST_FILES := $(shell cat Filelist.txt)
|
||||
endif
|
||||
|
||||
.PHONY: convert
|
||||
convert:
|
||||
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
|
||||
.PHONY: trim
|
||||
trim:
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
xattr -c *
|
||||
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
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-xattr -c *
|
||||
endif
|
||||
|
||||
# Build the ZIP file with source files. No documentation.
|
||||
.PHONY: zip dist
|
||||
zip dist: | distclean convert diff
|
||||
zip dist: | distclean convert
|
||||
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
|
||||
@ -440,9 +725,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_REVISION) "Benchmarks</H1>" >> benchmarks.html
|
||||
echo "<H1><a href=\"http://www.cryptopp.com\">Crypto++</a>" $(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH) "Benchmarks</H1>" >> benchmarks.html
|
||||
echo "<P>Here are speed benchmarks for some commonly used cryptographic algorithms.</P>" >> benchmarks.html
|
||||
./cryptest.exe b 3 2.4 >> benchmarks.html
|
||||
./cryptest.exe b 3 $(CRYPTOPP_CPU_SPEED) >> benchmarks.html
|
||||
echo "</BODY>" >> benchmarks.html
|
||||
echo "</HTML>" >> benchmarks.html
|
||||
|
||||
@ -469,6 +754,20 @@ 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 $@
|
||||
|
||||
@ -478,27 +777,17 @@ endif
|
||||
%.export.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
|
||||
|
||||
%.bc : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $<
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $<
|
||||
|
||||
# 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.)
|
||||
.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.)
|
||||
$(info )
|
||||
endif
|
||||
|
||||
252
Common/3dParty/cryptopp/GNUmakefile-cross
Normal file → Executable file
252
Common/3dParty/cryptopp/GNUmakefile-cross
Normal file → Executable file
@ -4,26 +4,50 @@ CXXFLAGS ?= -DNDEBUG -g2 -Os -fPIC -pipe
|
||||
# CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
# LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
ARFLAGS = -cr # ar needs the dash on OpenBSD
|
||||
AR ?= ar
|
||||
ARFLAGS ?= cr
|
||||
RANLIB ?= ranlib
|
||||
CP = cp
|
||||
MKDIR = mkdir
|
||||
EGREP = egrep
|
||||
CHMOD = chmod
|
||||
CP ?= cp
|
||||
MV ?= mv
|
||||
CHMOD ?= chmod
|
||||
MKDIR ?= mkdir
|
||||
EGREP ?= egrep
|
||||
LN ?= ln -sf
|
||||
|
||||
CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
|
||||
|
||||
IS_X86=0
|
||||
IS_LINUX=0
|
||||
IS_MINGW=0
|
||||
IS_DARWIN=0
|
||||
UNAME=CrossCompile
|
||||
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
|
||||
|
||||
# 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
|
||||
@ -31,120 +55,200 @@ ifneq ($(CLANG_COMPILER),0)
|
||||
CXXFLAGS += -Wall
|
||||
endif
|
||||
|
||||
# iOS cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
|
||||
# iOS cross-compile configuration.
|
||||
# See http://www.cryptopp.com/wiki/iOS_(Command_Line).
|
||||
ifeq ($(IS_IOS),1)
|
||||
CXX = clang++
|
||||
|
||||
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(IOS_FLAGS)
|
||||
CXXFLAGS += -arch $(IOS_ARCH) -isysroot $(IOS_SYSROOT)
|
||||
CXXFLAGS += -stdlib=libc++
|
||||
CXXFLAGS += $(IOS_FLAGS) -arch $(IOS_ARCH)
|
||||
CXXFLAGS += -isysroot $(IOS_SYSROOT) -stdlib=libc++
|
||||
|
||||
AR = libtool
|
||||
ARFLAGS = -static -o
|
||||
RANLIB = ranlib
|
||||
endif
|
||||
|
||||
# Android cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
|
||||
# Android cross-compile configuration.
|
||||
# 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 += -DCRYPTOPP_DISABLE_ASM $(ANDROID_FLAGS)
|
||||
CXXFLAGS += --sysroot=$(ANDROID_SYSROOT) -I$(ANDROID_STL_INC)
|
||||
LDLIBS += $(ANDROID_STL_LIB)
|
||||
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)
|
||||
endif
|
||||
|
||||
# ARM embedded cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
|
||||
# ARM embedded cross-compile configuration.
|
||||
# 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 += -DCRYPTOPP_DISABLE_ASM $(ARM_EMBEDDED_FLAGS)
|
||||
CXXFLAGS += --sysroot=$(ARM_EMBEDDED_SYSROOT)
|
||||
CXXFLAGS += $(ARM_EMBEDDED_FLAGS) --sysroot=$(ARM_EMBEDDED_SYSROOT)
|
||||
endif
|
||||
|
||||
# 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))
|
||||
# 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 of objects with crytlib.o at the first index position
|
||||
# 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))
|
||||
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
|
||||
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)
|
||||
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
|
||||
|
||||
# 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)
|
||||
# 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)
|
||||
|
||||
# Import lib testing
|
||||
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
|
||||
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
|
||||
DLLTESTOBJS := dlltest.dllonly.o
|
||||
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
|
||||
|
||||
.PHONY: all
|
||||
all: cryptest.exe
|
||||
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
ifneq ($(IS_IOS),0)
|
||||
static: libcryptopp.a
|
||||
shared dynamic dylib: libcryptopp.dylib
|
||||
else
|
||||
static: libcryptopp.a
|
||||
shared dynamic: libcryptopp.so
|
||||
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
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 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
|
||||
-$(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/
|
||||
endif
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps cryptopp$(LIB_VER).diff cryptopp$(LIB_VER).zip *.o *.ii *.s
|
||||
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps cryptopp.tgz *.o *.ii *.s
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
$(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
|
||||
$(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
|
||||
endif
|
||||
|
||||
.PHONY: remove uninstall
|
||||
remove uninstall:
|
||||
-$(RM) -r $(PREFIX)/include/cryptopp
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.a
|
||||
-$(RM) $(PREFIX)/bin/cryptest.exe
|
||||
ifneq ($(IS_DARWIN),0)
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.dylib
|
||||
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
|
||||
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
|
||||
ifneq ($(IS_IOS),0)
|
||||
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
|
||||
else
|
||||
-$(RM) $(PREFIX)/lib/libcryptopp.so
|
||||
-$(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
|
||||
endif
|
||||
|
||||
libcryptopp.a: public_service | $(LIBOBJS)
|
||||
libcryptopp.a: $(LIBOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libcryptopp.so: public_service | $(LIBOBJS)
|
||||
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
|
||||
ifeq ($(HAS_SOLIB_VERSION),1)
|
||||
.PHONY: libcryptopp.so
|
||||
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
|
||||
endif
|
||||
|
||||
cryptest.exe: public_service | libcryptopp.a $(TESTOBJS)
|
||||
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)
|
||||
$(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
|
||||
@ -162,25 +266,3 @@ 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,169 +1,185 @@
|
||||
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.
|
||||
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.
|
||||
|
||||
@ -1,51 +1,51 @@
|
||||
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.
|
||||
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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
0123456789abcdeffedcba9876543210 0123456789abcde7 7f1d0a77826b8aff
|
||||
0123456789abcdeffedcba987654321089abcdef01234567 0123456789abcde7 de0b7c06ae5e0ed5
|
||||
0123456789ABCDEF01010101010101011011121314151617 94DBE082549A14EF 9011121314151617
|
||||
@ -1,5 +0,0 @@
|
||||
000000000000000000000000 000000010000000100000001 4059c76e83ae9dc4ad21ecf7
|
||||
000000060000000500000004 000000030000000200000001 d2f05b5ed6144138cab920cd
|
||||
def01234456789abbcdef012 234567899abcdef001234567 0aa55dbb9cdddb6d7cdb76b2
|
||||
d2f05b5ed6144138cab920cd 4059c76e83ae9dc4ad21ecf7 478ea8716b13f17c15b155ed
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
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
|
||||
@ -1,11 +0,0 @@
|
||||
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
|
||||
@ -1,11 +0,0 @@
|
||||
2342bb9efa38542c0af75647f29f615d
|
||||
00000000000000000000000000000000
|
||||
c842a08972b43d20836c91d1b7530f6b
|
||||
|
||||
2342bb9efa38542cbed0ac83940ac298bac77a7717942863
|
||||
00000000000000000000000000000000
|
||||
1b386c0210dcadcbdd0e41aa08a7a7e8
|
||||
|
||||
2342bb9efa38542cbed0ac83940ac2988d7c47ce264908461cc1b5137ae6b604
|
||||
00000000000000000000000000000000
|
||||
4f6a2038286897b9c9870136553317fa
|
||||
@ -1,171 +0,0 @@
|
||||
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 +0,0 @@
|
||||
30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102
|
||||
@ -1 +0,0 @@
|
||||
308201080282010100EB60DBD494AAFBCD2EAC6A36DB8E7DD4A2A64512A5BBB15B9BFB581C7C1CAFB647D4612973C3770C2166D75EEA695F67EA8261557591DB78BCF5A886AA5294F3AEE4D25B57C8EE8C7FE8DBF70C132CD7FFCB6F89426F807F552C5DAE2FB1F329E340094E4B30D8EF6265AB4D350E9837B151C86AC524DE4E1FC04746C668BE318275E420D51AEDDFBDF887D435CDEEF6AC81293DB45287132F8236A43AD8F4D6642D7CA6732DA06A1DE008259008C9D74403B68ADAC788CF8AB5BEFFC310DCCCD32901D1F290E5B7A993D2CF6A652AF81B6DA0FD2E70678D1AE086150E41444522F20621195AD2A1F0975652B4AF7DE5261A9FD46B9EA8B443641F3BBA695B9B020103
|
||||
@ -1 +0,0 @@
|
||||
308201370201003082011706072A8648CE3804013082010A02818100D4EC6B7A18416519C76766726B3D2D5F054D107B30E97691B15EB0DCDF452B77F10E12C14450AB107BE349C2DF3A2DBD9D844A24ABA21B328D568E8EC6B959E70BADE5C49879AE4447F643360523469B55AFDC459B45634F657AA79918772F2BA9508ACD43C95C16650A1251B8173EBA1B9B59FE8C57F6240EA49A4FE8855CEF0281806A7635BD0C20B28CE3B3B339359E96AF82A6883D9874BB48D8AF586E6FA295BBF8870960A22855883DF1A4E16F9D16DECEC2251255D10D9946AB4747635CACF385D6F2E24C3CD72223FB219B0291A34DAAD7EE22CDA2B1A7B2BD53CC8C3B9795D4A84566A1E4AE0B32850928DC0B9F5D0DCDACFF462BFB1207524D27F442AE77020102041702150C9C14EEFA749DCE9A2A4B7065768767BA48BBB62F
|
||||
@ -1 +0,0 @@
|
||||
308202410201003082021906072A8648CE3804013082020C0282010100A8E87254E7F56CB5857786364ACC39F2A0F79FFF8ED6C62C64EE45FC1C775CDDBFD9CBCEF8262DBD2CECE4E5AFECA239B9B4B7D3CBA228366500F5B2203CA6C0CB0AB6698F73921B4831BA598DFA8268A07368A64774C77808AB7CB7978F839304B10567F8C9C34F8DBDB66BB928EDE6327773AA6C20A8F4E9C2AE0C66A0516E057BBC87760CF39270726F1863260CD5ADDAF366318E7029851A6F85B2349DF29629319A3662354DBCAD0789D02AC6BD804C06523900166501041963BD7EFFE0069694A54F4542172A29B1F09D26E3F052AE5274A898058BE549650BC2066DDFDB84D582E6503AF42BCB2B674F2A2A77C54678FD622FFCA2D9718BF8B0525AEF028201005474392A73FAB65AC2BBC31B25661CF9507BCFFFC76B6316327722FE0E3BAE6EDFECE5E77C1316DE96767272D7F6511CDCDA5BE9E5D1141B32807AD9101E536065855B34C7B9C90DA418DD2CC6FD41345039B45323BA63BC0455BE5BCBC7C1C9825882B3FC64E1A7C6DEDB35DC9476F3193BB9D53610547A74E15706335028B702BDDE43BB0679C93839378C3193066AD6ED79B318C73814C28D37C2D91A4EF94B1498CD1B311AA6DE5683C4E815635EC02603291C800B3280820CB1DEBF7FF0034B4A52A7A2A10B9514D8F84E9371F82957293A544C02C5F2A4B285E10336EFEDC26AC173281D7A15E595B3A795153BE2A33C7EB117FE516CB8C5FC58292D77020102041F021D031D7EC405D3E11D031B7B66DF9EFFCC5173B9B1639E4EC920731484EE
|
||||
@ -1 +0,0 @@
|
||||
3082014A0201003082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0416021426EBA66E846E755169F84A1DA981D86502405DDF
|
||||
@ -1 +0,0 @@
|
||||
308201B73082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0381850002818100D30312B7179661DA4691EDE39A71CB961199CD792C50AED6EA7E1A24C53590B6BCD92F26509D3372B2849A17C99C0962FBE4A2606CA37E6DF10244805363450FFAA24A7C274DF0B5D24AE7F31A8319FD2AA6E98AC6E7E3364E7AEDE575A9993609B0DFA387084141EA0B5B2D59B6DE718C0DAB4F86BC59F0DBE8602AED933494
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user