1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Fix minor codestyle issues

This commit is contained in:
Paul Schaub 2017-12-13 23:10:11 +01:00 committed by Florian Schmaus
parent 200f90ffdc
commit cb18056613
422 changed files with 1404 additions and 1444 deletions

View file

@ -117,7 +117,7 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
for (String part : challengeParts) {
String[] keyValue = part.split("=", 2);
String key = keyValue[0];
// RFC 2831 § 7.1 about the formating of the digest-challenge:
// RFC 2831 § 7.1 about the formatting of the digest-challenge:
// "The full form is "<n>#<m>element" indicating at least <n> and
// at most <m> elements, each separated by one or more commas
// (",") and OPTIONAL linear white space (LWS)."
@ -148,7 +148,7 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
byte[] a1FirstPart = MD5.bytes(authenticationId + ':' + serviceName + ':'
+ password);
cnonce = StringUtils.randomString(32);
byte[] a1 = ByteUtils.concact(a1FirstPart, toBytes(':' + nonce + ':' + cnonce));
byte[] a1 = ByteUtils.concat(a1FirstPart, toBytes(':' + nonce + ':' + cnonce));
digestUri = "xmpp/" + serviceName;
hex_hashed_a1 = StringUtils.encodeHex(MD5.bytes(a1));
String responseValue = calcResponse(DigestType.ClientResponse);

View file

@ -43,7 +43,7 @@ public class SASLPlainMechanism extends SASLMechanism {
byte[] authcid = toBytes(authzid + '\u0000' + authenticationId);
byte[] passw = toBytes('\u0000' + password);
return ByteUtils.concact(authcid, passw);
return ByteUtils.concat(authcid, passw);
}
@Override

View file

@ -19,7 +19,6 @@ package org.jivesoftware.smack.sasl.provided;
import java.io.UnsupportedEncodingException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.sasl.DigestMd5SaslTest;
import org.junit.Test;
@ -31,13 +30,13 @@ public class SASLDigestMD5Test extends DigestMd5SaslTest {
}
@Test
public void testDigestMD5() throws NotConnectedException, SmackException, InterruptedException,
public void testDigestMD5() throws SmackException, InterruptedException,
XmppStringprepException, UnsupportedEncodingException {
runTest(false);
}
@Test
public void testDigestMD5Authzid() throws NotConnectedException, SmackException, InterruptedException,
public void testDigestMD5Authzid() throws SmackException, InterruptedException,
XmppStringprepException, UnsupportedEncodingException {
runTest(true);
}