aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-16 12:28:21 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-16 12:28:21 +0100
commit84b2ce10b7a38aaaa9d2d3ee8ad4e1213402640f (patch)
tree9fb75476bd57dfb964ea4e9cf422385a7e21cc1f /src/main/java/eu/siacs/conversations/crypto
parentd43aeb721835e43a15e3496b3c06dda54d516d76 (diff)
parent2c6547753275a5c988ae4b6a4f15993700c736a6 (diff)
Merge branch 'development' of https://github.com/siacs/Conversations into development
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java b/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java
index f5765cf18..10cd3167e 100644
--- a/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java
+++ b/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha1.java
@@ -52,7 +52,7 @@ public class ScramSha1 extends SaslMechanism {
final String[] kparts = k.split(",", 4);
try {
final byte[] saltedPassword, serverKey, clientKey;
- saltedPassword = hi(CryptoHelper.saslPrep(CryptoHelper.hexToString(kparts[1])).getBytes(),
+ saltedPassword = hi(CryptoHelper.hexToString(kparts[1]).getBytes(),
Base64.decode(CryptoHelper.hexToString(kparts[2]), Base64.DEFAULT), Integer.valueOf(kparts[3]));
serverKey = hmac(saltedPassword, SERVER_KEY_BYTES);
clientKey = hmac(saltedPassword, CLIENT_KEY_BYTES);
@@ -88,7 +88,7 @@ public class ScramSha1 extends SaslMechanism {
@Override
public String getClientFirstMessage() {
if (clientFirstMessageBare.isEmpty() && state == State.INITIAL) {
- clientFirstMessageBare = "n=" + CryptoHelper.saslPrep(account.getUsername()) +
+ clientFirstMessageBare = "n=" + CryptoHelper.saslEscape(CryptoHelper.saslPrep(account.getUsername())) +
",r=" + this.clientNonce;
state = State.AUTH_TEXT_SENT;
}