[cpp-xmltooling] branch master updated: Rename decoding method.
Scott Cantor
cantor.2 at osu.edu
Tue Feb 20 16:58:00 EST 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-xmltooling.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=cdc18316da45bdec05c52169556aeebcc8a8ad5e
The following commit(s) were added to refs/heads/master by this push:
new cdc1831 Rename decoding method.
cdc1831 is described below
commit cdc18316da45bdec05c52169556aeebcc8a8ad5e
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 20 16:57:37 2018 -0500
Rename decoding method.
---
xmltooling/util/DataSealer.cpp | 10 +++++-----
xmltooling/util/DataSealer.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/xmltooling/util/DataSealer.cpp b/xmltooling/util/DataSealer.cpp
index f1b2889..3f1bcb8 100644
--- a/xmltooling/util/DataSealer.cpp
+++ b/xmltooling/util/DataSealer.cpp
@@ -84,22 +84,22 @@ string DataSealer::wrap(const char* s, time_t exp) const
return wrapped;
}
-string DataSealer::decode(const char* wrapped) const
+string DataSealer::unwrap(const char* s) const
{
XMLSize_t x;
- XMLByte* decoded = Base64::decode(reinterpret_cast<const XMLByte*>(wrapped), &x);
+ XMLByte* decoded = Base64::decode(reinterpret_cast<const XMLByte*>(s), &x);
if (!decoded)
throw IOException("Unable to decode base64 data.");
// Now we have to inflate it.
- stringstream s;
- if (XMLHelper::inflate(reinterpret_cast<char*>(decoded), x, s) == 0) {
+ stringstream in;
+ if (XMLHelper::inflate(reinterpret_cast<char*>(decoded), x, in) == 0) {
XMLString::release((char**)&decoded);
throw IOException("Unable to inflate wrapped data.");
}
XMLString::release((char**)&decoded);
- string decrypted = s.str();
+ string decrypted = in.str();
string dstr = decrypted.substr(0, 20);
auto_ptr_XMLCh expstr(dstr.c_str());
XMLDateTime exp(expstr.get());
diff --git a/xmltooling/util/DataSealer.h b/xmltooling/util/DataSealer.h
index 4b6fc0b..14be846 100644
--- a/xmltooling/util/DataSealer.h
+++ b/xmltooling/util/DataSealer.h
@@ -66,11 +66,11 @@ namespace xmltooling {
/**
* Decrypts and verifies an encrypted bundle wrapped via this object.
*
- * @param wrapped the encoded blob
+ * @param s the encoded blob
*
* @return the decrypted data, if it's unexpired
*/
- virtual std::string decode(const char* wrapped) const;
+ virtual std::string unwrap(const char* s) const;
};
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list