Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: third_party/libjingle_xmpp/xmpp/saslplainmechanism.h

Issue 2738973004: Replace rtc::CryptString with std::string (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libjingle_xmpp/xmpp/prexmppauth.h ('k') | third_party/libjingle_xmpp/xmpp/xmppclient.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libjingle_xmpp/xmpp/saslplainmechanism.h
diff --git a/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h b/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h
index b173c524f9f7d15a9d2db1a3d8529865f81d03d7..d7319b483c55a209efa43812311a0230c588509b 100644
--- a/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h
+++ b/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h
@@ -12,14 +12,13 @@
#define WEBRTC_LIBJINGLE_XMPP_SASLPLAINMECHANISM_H_
#include "third_party/libjingle_xmpp/xmpp/saslmechanism.h"
-#include "third_party/webrtc/base/cryptstring.h"
namespace buzz {
class SaslPlainMechanism : public SaslMechanism {
public:
- SaslPlainMechanism(const buzz::Jid user_jid, const rtc::CryptString & password) :
+ SaslPlainMechanism(const buzz::Jid user_jid, const std::string & password) :
user_jid_(user_jid), password_(password) {}
virtual std::string GetMechanismName() { return "PLAIN"; }
@@ -29,18 +28,18 @@ public:
XmlElement * el = new XmlElement(QN_SASL_AUTH, true);
el->AddAttr(QN_MECHANISM, "PLAIN");
- rtc::FormatCryptString credential;
- credential.Append("\0", 1);
- credential.Append(user_jid_.node());
- credential.Append("\0", 1);
- credential.Append(&password_);
- el->AddText(Base64EncodeFromArray(credential.GetData(), credential.GetLength()));
+ std::stringstream ss;
+ ss.write("\0", 1);
+ ss << user_jid_.node();
+ ss.write("\0", 1);
+ ss << password_;
+ el->AddText(Base64EncodeFromArray(ss.str().data(), ss.str().length()));
nisse-chromium (ooo August 14) 2017/03/09 13:01:57 I think this is where the password is ultimately u
return el;
}
private:
Jid user_jid_;
- rtc::CryptString password_;
+ std::string password_;
};
}
« no previous file with comments | « third_party/libjingle_xmpp/xmpp/prexmppauth.h ('k') | third_party/libjingle_xmpp/xmpp/xmppclient.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698