fixed login issue with latest ejabberd

This commit is contained in:
Daniel Gultsch 2014-03-28 18:31:04 +01:00
parent a649310fe2
commit 268eae7813

View file

@ -5,7 +5,6 @@ import java.security.SecureRandom;
import java.util.Random;
import android.util.Base64;
import android.util.Log;
public class CryptoHelper {
final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
@ -22,7 +21,7 @@ public class CryptoHelper {
}
public static String saslPlain(String username, String password) {
String sasl = '\u0000'+username + '\u0000' + password;
return Base64.encodeToString(sasl.getBytes(Charset.defaultCharset()),Base64.DEFAULT);
return Base64.encodeToString(sasl.getBytes(Charset.defaultCharset()),Base64.NO_WRAP);
}
public static String randomMucName() {