diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-18 13:45:41 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-18 14:24:28 (GMT) |
commit | 23fa0f462ddd0c686c677bfe5d4d743621432b7e (patch) | |
tree | b8f0ea1860640f89eafba2460cc5d45bf28fc77c /Swiften/Elements/AuthRequest.h | |
parent | 2456a8b12163b3249b6b9164b601c36772eb05a1 (diff) | |
download | swift-contrib-23fa0f462ddd0c686c677bfe5d4d743621432b7e.zip swift-contrib-23fa0f462ddd0c686c677bfe5d4d743621432b7e.tar.bz2 |
Introduce safe containers for storing passwords.
Diffstat (limited to 'Swiften/Elements/AuthRequest.h')
-rw-r--r-- | Swiften/Elements/AuthRequest.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Swiften/Elements/AuthRequest.h b/Swiften/Elements/AuthRequest.h index 5e4e4ab..bfc86c2 100644 --- a/Swiften/Elements/AuthRequest.h +++ b/Swiften/Elements/AuthRequest.h @@ -11,6 +11,7 @@ #include <boost/optional.hpp> #include <Swiften/Elements/Element.h> +#include <Swiften/Base/SafeByteArray.h> namespace Swift { class AuthRequest : public Element { @@ -18,20 +19,20 @@ namespace Swift { AuthRequest(const std::string& mechanism = "") : mechanism_(mechanism) { } - AuthRequest(const std::string& mechanism, const std::vector<unsigned char>& message) : + AuthRequest(const std::string& mechanism, const SafeByteArray& message) : mechanism_(mechanism), message_(message) { } - AuthRequest(const std::string& mechanism, const boost::optional<std::vector<unsigned char> >& message) : + AuthRequest(const std::string& mechanism, const boost::optional<SafeByteArray>& message) : mechanism_(mechanism), message_(message) { } - const boost::optional<std::vector<unsigned char> >& getMessage() const { + const boost::optional<SafeByteArray>& getMessage() const { return message_; } - void setMessage(const std::vector<unsigned char>& message) { - message_ = boost::optional<std::vector<unsigned char> >(message); + void setMessage(const SafeByteArray& message) { + message_ = boost::optional<SafeByteArray>(message); } const std::string& getMechanism() const { @@ -44,6 +45,6 @@ namespace Swift { private: std::string mechanism_; - boost::optional<std::vector<unsigned char> > message_; + boost::optional<SafeByteArray> message_; }; } |