List of usage examples for org.apache.shiro.crypto.hash Sha1Hash ALGORITHM_NAME
String ALGORITHM_NAME
To view the source code for org.apache.shiro.crypto.hash Sha1Hash ALGORITHM_NAME.
Click Source Link
From source file:b4f.seguridad.ShiroAuthorizingRealm.java
public ShiroAuthorizingRealm() { setName("ShiroAuthorizingRealm"); setCredentialsMatcher(new HashedCredentialsMatcher(Sha1Hash.ALGORITHM_NAME)); System.out.println("ShiroAuthorizingRealm()"); }
From source file:de.lemo.apps.services.security.UserRealm.java
License:Open Source License
public UserRealm(final Session session) { super(new MemoryConstrainedCacheManager()); this.session = session; this.setAuthenticationTokenClass(UsernamePasswordToken.class); this.setCredentialsMatcher(new HashedCredentialsMatcher(Sha1Hash.ALGORITHM_NAME)); }
From source file:org.qi4j.library.shiro.crypto.HashFactory.java
License:Open Source License
public static Hash create(String algorithmName, Object source, Object salt, int hashIterations) { if (algorithmName == null || algorithmName.length() <= 0) { throw new IllegalArgumentException("Algorithm name was null or empty"); }/* www .j a va 2s .c om*/ if (!Arrays.asList(VALID_ALGORITHM_NAMES).contains(algorithmName)) { throw new IllegalArgumentException(algorithmName + " is not a valid algorithm. Valid ones are : " + Arrays.toString(VALID_ALGORITHM_NAMES)); } if (Md2Hash.ALGORITHM_NAME.equals(algorithmName)) { return new Md2Hash(source, salt, hashIterations); } if (Md5Hash.ALGORITHM_NAME.equals(algorithmName)) { return new Md5Hash(source, salt, hashIterations); } if (Sha1Hash.ALGORITHM_NAME.equals(algorithmName)) { return new Sha1Hash(source, salt, hashIterations); } if (Sha256Hash.ALGORITHM_NAME.equals(algorithmName)) { return new Sha256Hash(source, salt, hashIterations); } if (Sha384Hash.ALGORITHM_NAME.equals(algorithmName)) { return new Sha384Hash(source, salt, hashIterations); } if (Sha512Hash.ALGORITHM_NAME.equals(algorithmName)) { return new Sha512Hash(source, salt, hashIterations); } throw new InternalError("You shall not pass!"); }