当前位置: 首页>>代码示例>>Java>>正文


Java AuthFactory.decryptPassword方法代码示例

本文整理汇总了Java中org.jivesoftware.openfire.auth.AuthFactory.decryptPassword方法的典型用法代码示例。如果您正苦于以下问题:Java AuthFactory.decryptPassword方法的具体用法?Java AuthFactory.decryptPassword怎么用?Java AuthFactory.decryptPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jivesoftware.openfire.auth.AuthFactory的用法示例。


在下文中一共展示了AuthFactory.decryptPassword方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDecrypted

import org.jivesoftware.openfire.auth.AuthFactory; //导入方法依赖的package包/类
@Override
public String getDecrypted(String value) {
  String decrypted = null;
  try {
    decrypted = AuthFactory.decryptPassword(value);
    // Set password to null so that it's inserted that way.
  } catch (UnsupportedOperationException uoe) {
    // Encrypting the apiKey may have failed. Therefore,

  }
  return decrypted;
}
 
开发者ID:magnetsystems,项目名称:message-server,代码行数:13,代码来源:DefaultOpenfireEncryptor.java

示例2: getDecrypted

import org.jivesoftware.openfire.auth.AuthFactory; //导入方法依赖的package包/类
/**
 * Decrypt a string using openfire AuthFactory
 * @param value
 * @return
 */
protected String getDecrypted(String value) {
  String decrypted = null;
  try {
    decrypted = AuthFactory.decryptPassword(value);
  } catch (UnsupportedOperationException uoe) {
  }
  return decrypted;
}
 
开发者ID:magnetsystems,项目名称:message-server,代码行数:14,代码来源:AppDAOImpl.java

示例3: loadFromDb

import org.jivesoftware.openfire.auth.AuthFactory; //导入方法依赖的package包/类
/**
 * Load registration from database.
 *
 * @throws NotFoundException if registration was not found in database.
 */
private void loadFromDb() throws NotFoundException {
    if (disconnectedMode) { return; }        
    Connection con = null;
    PreparedStatement pstmt = null;
    ResultSet rs = null;
    try {
        con = DbConnectionManager.getConnection();
        pstmt = con.prepareStatement(LOAD_REGISTRATION);
        pstmt.setLong(1, registrationID);
        rs = pstmt.executeQuery();
        if (!rs.next()) {
            throw new NotFoundException("Registration not found: " + registrationID);
        }
        this.jid = new JID(rs.getString(1));
        this.transportType = TransportType.valueOf(rs.getString(2));
        this.username = rs.getString(3);
        // The password is stored in encrypted form, so decrypt it.
        this.password = AuthFactory.decryptPassword(rs.getString(4));
        this.nickname = rs.getString(5);
        this.registrationDate = new Date(rs.getLong(6));
        long loginDate = rs.getLong(7);
        if (rs.wasNull()) {
            this.lastLogin = null;
        }
        else {
            this.lastLogin = new Date(loginDate);
        }
    }
    catch (SQLException sqle) {
        Log.error(sqle);
    }
    finally {
        DbConnectionManager.closeConnection(rs, pstmt, con);
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:41,代码来源:Registration.java


注:本文中的org.jivesoftware.openfire.auth.AuthFactory.decryptPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。