com.manydesigns.portofino.shiro.PlaintextHashService Maven / Gradle / Ivy
package com.manydesigns.portofino.shiro;
import org.apache.shiro.crypto.hash.Hash;
import org.apache.shiro.crypto.hash.HashRequest;
import org.apache.shiro.crypto.hash.HashService;
import org.apache.shiro.crypto.hash.SimpleHash;
/**
* @author Angelo Lupo - [email protected]
* @author Giampiero Granatella - [email protected]
* @author Emanuele Poggi - [email protected]
* @author Alessio Stalla - [email protected]
*/
public class PlaintextHashService implements HashService {
public static final String copyright =
"Copyright (C) 2005-2017 ManyDesigns srl";
@Override
public Hash computeHash(HashRequest request) {
SimpleHash result = new SimpleHash(request.getAlgorithmName());
result.setSalt(request.getSalt());
result.setIterations(request.getIterations());
result.setBytes(request.getSource().getBytes());
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy