SimpleHash implementation directly.@Deprecated public abstract class AbstractHash extends org.apache.shiro.codec.CodecSupport implements Hash, Serializable
ByteSource.Util| 构造器和说明 |
|---|
AbstractHash()
已过时。
|
AbstractHash(Object source)
已过时。
|
AbstractHash(Object source,
Object salt)
已过时。
|
AbstractHash(Object source,
Object salt,
int hashIterations)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
已过时。
Returns
true if the specified object is a Hash and its byte array is identical to
this Hash's byte array, false otherwise. |
abstract String |
getAlgorithmName()
已过时。
Implemented by subclasses, this specifies the
MessageDigest algorithm name
to use when performing the hash. |
byte[] |
getBytes()
已过时。
|
int |
hashCode()
已过时。
Simply returns toHex().hashCode();
|
void |
setBytes(byte[] alreadyHashedBytes)
已过时。
|
String |
toBase64()
已过时。
|
String |
toHex()
已过时。
|
String |
toString()
已过时。
Simple implementation that merely returns
toHex(). |
toBytes, toBytes, toBytes, toBytes, toChars, toChars, toString, toStringgetIterations, getSaltisEmptypublic AbstractHash()
public AbstractHash(Object source) throws org.apache.shiro.codec.CodecException
source - the object to be hashed.org.apache.shiro.codec.CodecException - if the specified source cannot be converted into a byte array (byte[]).public AbstractHash(Object source, Object salt) throws org.apache.shiro.codec.CodecException
source - the source object to be hashed.salt - the salt to use for the hashorg.apache.shiro.codec.CodecException - if either constructor argument cannot be converted into a byte array.public AbstractHash(Object source, Object salt, int hashIterations) throws org.apache.shiro.codec.CodecException
source - the source object to be hashed.salt - the salt to use for the hashhashIterations - the number of times the source argument hashed for attack resiliency.org.apache.shiro.codec.CodecException - if either Object constructor argument cannot be converted into a byte array.public abstract String getAlgorithmName()
MessageDigest algorithm name
to use when performing the hash.getAlgorithmName 在接口中 HashMessageDigest algorithm name to use when performing the hash.public byte[] getBytes()
getBytes 在接口中 ByteSourcepublic void setBytes(byte[] alreadyHashedBytes)
alreadyHashedBytes - the raw already-hashed bytes to store in this instance.public String toHex()
toHex 在接口中 ByteSourcebyte array.public String toBase64()
toBase64 在接口中 ByteSourcebyte array.public boolean equals(Object o)
true if the specified object is a Hash and its byte array is identical to
this Hash's byte array, false otherwise.equals 在类中 Objecto - the object (Hash) to check for equality.true if the specified object is a Hash and its byte array is identical to
this Hash's byte array, false otherwise.Copyright © 2015-2017. All Rights Reserved.