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


Java DefaultPasswordService.setHashService方法代码示例

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


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

示例1: passwordService

import org.apache.shiro.authc.credential.DefaultPasswordService; //导入方法依赖的package包/类
@Bean
@ConditionalOnMissingBean
public PasswordService passwordService() {
    DefaultPasswordService service = new DefaultPasswordService();

    DefaultHashService hashService = new DefaultHashService();
    hashService.setHashAlgorithmName(shiroProperties.getHashAlgorithmName());
    hashService.setHashIterations(shiroProperties.getHashIterations());
    service.setHashService(hashService);

    return service;
}
 
开发者ID:storezhang,项目名称:utils,代码行数:13,代码来源:ShiroAutoConfiguration.java

示例2: createPasswordService

import org.apache.shiro.authc.credential.DefaultPasswordService; //导入方法依赖的package包/类
/**
 * Creates the password service without registering it.
 * 
 * @param repo  the component repository, only used to register secondary items like lifecycle, not null
 * @return the password service, not null
 */
protected PasswordService createPasswordService(ComponentRepository repo) {
  DefaultHashService hashService = new DefaultHashService();
  hashService.setHashAlgorithmName(getHashAlgorithm());
  hashService.setHashIterations(getHashIterations());
  hashService.setGeneratePublicSalt(true);
  hashService.setPrivateSalt(new SimpleByteSource(getPrivateSalt()));
  DefaultPasswordService pwService = new DefaultPasswordService();
  pwService.setHashService(hashService);
  return pwService;
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:17,代码来源:ShiroSecurityComponentFactory.java

示例3: getPasswordService

import org.apache.shiro.authc.credential.DefaultPasswordService; //导入方法依赖的package包/类
public static HashingPasswordService getPasswordService() {
	DefaultHashService hashService = new DefaultHashService();
	hashService.setHashIterations(HASH_ITERATIONS);
	hashService.setHashAlgorithmName(Sha512Hash.ALGORITHM_NAME);
	hashService.setGeneratePublicSalt(true);

	DefaultPasswordService passwordService = new DefaultPasswordService();
	passwordService.setHashService(hashService);
	return passwordService;
}
 
开发者ID:mondo-project,项目名称:mondo-integration,代码行数:11,代码来源:UserStorage.java


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