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

Side by Side Diff: third_party/libjingle_xmpp/xmpp/saslmechanism.cc

Issue 2443903004: Add xmllite and xmpp sources to third_party/ (Closed)
Patch Set: Explicitly use webrtc_overrides/webrtc/base/logging.h Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h"
12 #include "third_party/libjingle_xmpp/xmpp/constants.h"
13 #include "third_party/libjingle_xmpp/xmpp/saslmechanism.h"
14 #include "third_party/webrtc/base/base64.h"
15
16 using rtc::Base64;
17
18 namespace buzz {
19
20 XmlElement *
21 SaslMechanism::StartSaslAuth() {
22 return new XmlElement(QN_SASL_AUTH, true);
23 }
24
25 XmlElement *
26 SaslMechanism::HandleSaslChallenge(const XmlElement * challenge) {
27 return new XmlElement(QN_SASL_ABORT, true);
28 }
29
30 void
31 SaslMechanism::HandleSaslSuccess(const XmlElement * success) {
32 }
33
34 void
35 SaslMechanism::HandleSaslFailure(const XmlElement * failure) {
36 }
37
38 std::string
39 SaslMechanism::Base64Encode(const std::string & plain) {
40 return Base64::Encode(plain);
41 }
42
43 std::string
44 SaslMechanism::Base64Decode(const std::string & encoded) {
45 return Base64::Decode(encoded, Base64::DO_LAX);
46 }
47
48 std::string
49 SaslMechanism::Base64EncodeFromArray(const char * plain, size_t length) {
50 std::string result;
51 Base64::EncodeFromArray(plain, length, &result);
52 return result;
53 }
54
55 }
OLDNEW
« no previous file with comments | « third_party/libjingle_xmpp/xmpp/saslmechanism.h ('k') | third_party/libjingle_xmpp/xmpp/saslplainmechanism.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698