Don't use a class for what namespaces are for
Sure, using a namespace means we have to decorate each function with the XMLSECURITY_DLLPUBLIC, but who cares. Change-Id: If9a364d1be9c5f4cd02f3f146e8b01bd608b373e
This commit is contained in:
@@ -36,17 +36,6 @@ namespace embed {
|
|||||||
class XStorage; }
|
class XStorage; }
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************
|
|
||||||
DocumentSignatureHelper
|
|
||||||
|
|
||||||
Helper class for signing and verifieng document signatures
|
|
||||||
|
|
||||||
Functions:
|
|
||||||
1. help to create a list of content to be signed/verified
|
|
||||||
|
|
||||||
**********************************************************/
|
|
||||||
|
|
||||||
enum class DocumentSignatureMode
|
enum class DocumentSignatureMode
|
||||||
{
|
{
|
||||||
Content,
|
Content,
|
||||||
@@ -74,32 +63,35 @@ struct SignatureStreamHelper
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace DocumentSignatureHelper
|
||||||
class XMLSECURITY_DLLPUBLIC DocumentSignatureHelper
|
|
||||||
{
|
{
|
||||||
public:
|
SignatureStreamHelper XMLSECURITY_DLLPUBLIC OpenSignatureStream(
|
||||||
|
|
||||||
static SignatureStreamHelper OpenSignatureStream(
|
|
||||||
const css::uno::Reference < css::embed::XStorage >& rxStore, sal_Int32 nOpenMode,
|
const css::uno::Reference < css::embed::XStorage >& rxStore, sal_Int32 nOpenMode,
|
||||||
DocumentSignatureMode eDocSigMode );
|
DocumentSignatureMode eDocSigMode );
|
||||||
static std::vector< OUString > CreateElementList(
|
|
||||||
|
std::vector< OUString > XMLSECURITY_DLLPUBLIC CreateElementList(
|
||||||
const css::uno::Reference < css::embed::XStorage >& rxStore,
|
const css::uno::Reference < css::embed::XStorage >& rxStore,
|
||||||
DocumentSignatureMode eMode,
|
DocumentSignatureMode eMode,
|
||||||
const DocumentSignatureAlgorithm mode);
|
const DocumentSignatureAlgorithm mode);
|
||||||
static bool isODFPre_1_2(const OUString & sODFVersion);
|
|
||||||
static bool isOOo3_2_Signature(const SignatureInformation & sigInfo);
|
|
||||||
static DocumentSignatureAlgorithm getDocumentAlgorithm(
|
|
||||||
const OUString & sODFVersion, const SignatureInformation & sigInfo);
|
|
||||||
static bool checkIfAllFilesAreSigned( const ::std::vector< OUString > & sElementList,
|
|
||||||
const SignatureInformation & sigInfo, const DocumentSignatureAlgorithm alg);
|
|
||||||
static bool equalsReferenceUriManifestPath(
|
|
||||||
const OUString & rUri, const OUString & rPath);
|
|
||||||
static OUString GetDocumentContentSignatureDefaultStreamName();
|
|
||||||
static OUString GetScriptingContentSignatureDefaultStreamName();
|
|
||||||
static OUString GetPackageSignatureDefaultStreamName();
|
|
||||||
/// In case the storage is OOXML, prepend a leading '/' and append content type to the element URIs.
|
|
||||||
static void AppendContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, std::vector<OUString>& rElements);
|
|
||||||
|
|
||||||
|
bool XMLSECURITY_DLLPUBLIC isODFPre_1_2(const OUString & sODFVersion);
|
||||||
|
bool XMLSECURITY_DLLPUBLIC isOOo3_2_Signature(const SignatureInformation & sigInfo);
|
||||||
|
|
||||||
|
DocumentSignatureAlgorithm XMLSECURITY_DLLPUBLIC getDocumentAlgorithm(
|
||||||
|
const OUString & sODFVersion, const SignatureInformation & sigInfo);
|
||||||
|
|
||||||
|
bool XMLSECURITY_DLLPUBLIC checkIfAllFilesAreSigned( const ::std::vector< OUString > & sElementList,
|
||||||
|
const SignatureInformation & sigInfo, const DocumentSignatureAlgorithm alg);
|
||||||
|
|
||||||
|
bool XMLSECURITY_DLLPUBLIC equalsReferenceUriManifestPath(
|
||||||
|
const OUString & rUri, const OUString & rPath);
|
||||||
|
|
||||||
|
OUString XMLSECURITY_DLLPUBLIC GetDocumentContentSignatureDefaultStreamName();
|
||||||
|
OUString XMLSECURITY_DLLPUBLIC GetScriptingContentSignatureDefaultStreamName();
|
||||||
|
OUString XMLSECURITY_DLLPUBLIC GetPackageSignatureDefaultStreamName();
|
||||||
|
|
||||||
|
/// In case the storage is OOXML, prepend a leading '/' and append content type to the element URIs.
|
||||||
|
void XMLSECURITY_DLLPUBLIC AppendContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, std::vector<OUString>& rElements);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDED_XMLSECURITY_INC_DOCUMENTSIGNATUREHELPER_HXX
|
#endif // INCLUDED_XMLSECURITY_INC_DOCUMENTSIGNATUREHELPER_HXX
|
||||||
|
Reference in New Issue
Block a user