summaryrefslogtreecommitdiff
path: root/include/comphelper/docpasswordhelper.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-02-26 13:18:22 +0100
committerEike Rathke <erack@redhat.com>2018-02-26 13:19:12 +0100
commit530465964a487c9633305bc886c7826f97f7f1ce (patch)
treedfc33a3db957b83880bd1192dae6a60610f04aac /include/comphelper/docpasswordhelper.hxx
parent389405cc49cb07a5414dd2b7ac10d9a7785e012b (diff)
Prepare to handle OOXML Agile Encryption password hash as well
... that prepends the iteration count to the hash instead of appending it Change-Id: I090393e6337c110029e35baaa259b40ef4e5d416
Diffstat (limited to 'include/comphelper/docpasswordhelper.hxx')
-rw-r--r--include/comphelper/docpasswordhelper.hxx34
1 files changed, 28 insertions, 6 deletions
diff --git a/include/comphelper/docpasswordhelper.hxx b/include/comphelper/docpasswordhelper.hxx
index 51ecb7102abd..0755106b1d23 100644
--- a/include/comphelper/docpasswordhelper.hxx
+++ b/include/comphelper/docpasswordhelper.hxx
@@ -194,11 +194,21 @@ public:
@param nSpinCount
If >0 the number of repeated iterations.
+ @param bPrependNotAppend
+ If <FALSE/>, append spin count in iterations as per
+ https://msdn.microsoft.com/en-us/library/dd920692
+ If <TRUE/>, prepend spin count in iterations as per
+ https://msdn.microsoft.com/en-us/library/dd924776 and
+ https://msdn.microsoft.com/en-us/library/dd925430
+
@param rAlgorithmName
- One of "SHA-512", "SHA-256", ... as listed in
+ One of "SHA-512", "SHA-256", ... as listed for AlgorithmName in
https://msdn.microsoft.com/en-us/library/dd920692
- that have a valid match in HashType. If not, an empty string is
- returned. Not all algorithm names are supported.
+ or "SHA512", "SHA256", ... as listed for HashAlgorithm in
+ https://msdn.microsoft.com/en-us/library/dd925810
+ that have a valid match in comphelper::HashType. If not, an
+ empty sequence is returned. Not all algorithm names are
+ supported.
@return the raw hash value as sal_Int8 sequence.
*/
@@ -206,6 +216,7 @@ public:
const rtl::OUString& rPassword,
const rtl::OUString& rSaltValue,
sal_uInt32 nSpinCount,
+ bool bPrependNotAppend,
const rtl::OUString& rAlgorithmName);
@@ -223,11 +234,21 @@ public:
@param nSpinCount
If >0 the number of repeated iterations.
+ @param bPrependNotAppend
+ If <FALSE/>, append spin count in iterations as per
+ https://msdn.microsoft.com/en-us/library/dd920692
+ If <TRUE/>, prepend spin count in iterations as per
+ https://msdn.microsoft.com/en-us/library/dd924776 and
+ https://msdn.microsoft.com/en-us/library/dd925430
+
@param rAlgorithmName
- One of "SHA-512", "SHA-256", ... as listed in
+ One of "SHA-512", "SHA-256", ... as listed for AlgorithmName in
https://msdn.microsoft.com/en-us/library/dd920692
- that have a valid match in HashType. If not, an empty string is
- returned. Not all algorithm names are supported.
+ or "SHA512", "SHA256", ... as listed for HashAlgorithm in
+ https://msdn.microsoft.com/en-us/library/dd925810
+ that have a valid match in comphelper::HashType. If not, an
+ empty sequence is returned. Not all algorithm names are
+ supported.
@return the base64 encoded string of the hash value, that can be
compared against a stored base64 encoded hash value.
@@ -236,6 +257,7 @@ public:
const rtl::OUString& rPassword,
const rtl::OUString& rSaltValue,
sal_uInt32 nSpinCount,
+ bool bPrependNotAppend,
const rtl::OUString& rAlgorithmName);