mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Fix minor codestyle issues
This commit is contained in:
parent
200f90ffdc
commit
cb18056613
422 changed files with 1404 additions and 1444 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue