org.apache.shiro.crypto.hash
Class Sha1Hash
java.lang.Object
org.apache.shiro.codec.CodecSupport
org.apache.shiro.crypto.hash.AbstractHash
org.apache.shiro.crypto.hash.Sha1Hash
- All Implemented Interfaces:
- Serializable, Hash
public class Sha1Hash
- extends AbstractHash
Generates an SHA-1 Hash (Secure Hash Standard, NIST FIPS 180-1) from a given input source with an
optional salt and hash iterations.
See the AbstractHash parent class JavaDoc for a detailed explanation of Hashing
techniques and how the overloaded constructors function.
- Since:
- 0.9
- Author:
- Les Hazlewood
- See Also:
- Serialized Form
| Methods inherited from class org.apache.shiro.crypto.hash.AbstractHash |
equals, getBytes, getDigest, hash, hash, hash, hashCode, setBytes, toBase64, toHex, toString |
| Methods inherited from class org.apache.shiro.codec.CodecSupport |
isByteSource, objectToBytes, objectToString, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toBytes, toChars, toChars, toString, toString, toString |
ALGORITHM_NAME
public static final String ALGORITHM_NAME
- See Also:
- Constant Field Values
Sha1Hash
public Sha1Hash()
Sha1Hash
public Sha1Hash(Object source)
Sha1Hash
public Sha1Hash(Object source,
Object salt)
Sha1Hash
public Sha1Hash(Object source,
Object salt,
int hashIterations)
getAlgorithmName
protected String getAlgorithmName()
- Description copied from class:
AbstractHash
- Implemented by subclasses, this specifies the name of the
MessageDigest algorithm
to use when performing the hash.
- Specified by:
getAlgorithmName in class AbstractHash
- Returns:
- the
MessageDigest algorithm to use when performing the hash.
fromHexString
public static Sha1Hash fromHexString(String hex)
fromBase64String
public static Sha1Hash fromBase64String(String base64)
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.