aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils/CryptoHelper.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-03 09:21:45 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-03 09:21:45 +0200
commit21be7bc16080f89778b0df4c7c55fd93b9f991a1 (patch)
tree78cf4decd7bb8310d0db53a1e97d646fa7c1acd6 /src/eu/siacs/conversations/utils/CryptoHelper.java
parentd53dc28f4cb79d3508db2a30c5fab758f8a8ff13 (diff)
added permenant notification when one or more accounts are unable to connect
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/utils/CryptoHelper.java7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/utils/CryptoHelper.java b/src/eu/siacs/conversations/utils/CryptoHelper.java
index c1be56c88..98dbea4de 100644
--- a/src/eu/siacs/conversations/utils/CryptoHelper.java
+++ b/src/eu/siacs/conversations/utils/CryptoHelper.java
@@ -44,10 +44,6 @@ public class CryptoHelper {
public static String saslDigestMd5(Account account, String challenge) {
try {
Random random = new SecureRandom();
- Log.d("xmppService",
- "challenge="
- + new String(Base64.decode(challenge,
- Base64.DEFAULT)));
String[] challengeParts = new String(Base64.decode(challenge,
Base64.DEFAULT)).split(",");
String nonce = "";
@@ -67,7 +63,6 @@ public class CryptoHelper {
byte[] y = md
.digest(x.getBytes(Charset.defaultCharset()));
String cNonce = new BigInteger(100, random).toString(32);
- Log.d("xmppService", "conce=" + cNonce);
byte[] a1 = concatenateByteArrays(y,(":"+nonce+":"+cNonce).getBytes(Charset.defaultCharset()));
String a2 = "AUTHENTICATE:"+digestUri;
String ha1 = bytesToHex(md.digest(a1));
@@ -75,7 +70,6 @@ public class CryptoHelper {
.defaultCharset())));
String kd = ha1 + ":" + nonce + ":"+nonceCount+":" + cNonce + ":auth:"
+ ha2;
- Log.d("xmppService", "kd=" + kd);
String response = bytesToHex(md.digest(kd.getBytes(Charset
.defaultCharset())));
String saslString = "username=\"" + account.getUsername()
@@ -83,7 +77,6 @@ public class CryptoHelper {
+ nonce + "\",cnonce=\"" + cNonce
+ "\",nc="+nonceCount+",qop=auth,digest-uri=\""+digestUri+"\",response=" + response
+ ",charset=utf-8";
- Log.d("xmppService", "saslString=" + saslString);
return Base64.encodeToString(
saslString.getBytes(Charset.defaultCharset()),
Base64.NO_WRAP);