3
如何使用MD5散列密码来登录openfire?使用md5 Smack登录散列密码到Openfire
我正在使用smack 4.0.4。
我试过DIGEST-MD5 registiration但它不能正常工作
SASLAuthentication.registerSASLMechanism("DIGEST-MD5", SASLDigestMD5Mechanism.class);
SASLAuthentication.supportSASLMechanism("DIGEST-MD5");
我得到这个错误:
SASLError使用简单:没有授权
我代码如下所示:
config = new ConnectionConfiguration(xmppServerAddress, Integer.parseInt(xmppServerPort));
config.setDebuggerEnabled(true);
config.setReconnectionAllowed(true);
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
XMPPTCPConnection connectionTmp = new XMPPTCPConnection(config);
connectionTmp.connect();
connectionTmp.login("username","md5hashedpassword");