public interface IHashContext
| 限定符和类型 | 方法和说明 |
|---|---|
String |
algorithmName()
Returns the name of the hash algorithm the
HashService should use when computing the Hash, or
null if the default algorithm configuration of the HashService should be used. |
byte[] |
salt()
Returns a salt to be used by the
IHash during hash computation, or null if no salt is
provided as part of the request. |
byte[] |
source()
Returns the source data that will be hashed by a
IHash. |
int |
times()
Returns the number of requested hash iterations to be performed when computing the final
Hash result. |
byte[] source()
IHash. For example, this might be a
ByteSource representation of a password, or file, etc.IHash.byte[] salt()
IHash during hash computation, or null if no salt is
provided as part of the request.
Note that a null value does not necessarily mean a salt won't be used at all - it just
means that the request didn't include one. The servicing IHash is free to provide a salting
strategy for a request, even if the request did not specify one.IHash during hash computation, or null if no salt is
provided as part of the request.int times()
Hash result.
A non-positive (0 or less) indicates that the HashService's default iteration configuration should
be used. A positive value overrides the HashService's configuration for a single request.
Note that a HashService is free to ignore this number if it determines the number is not sufficient
to meet a desired level of security.Hash result.String algorithmName()
HashService should use when computing the Hash, or
null if the default algorithm configuration of the HashService should be used. A non-null value
overrides the HashService's configuration for a single request.
Note that a HashService is free to ignore this value if it determines that the algorithm is not
sufficient to meet a desired level of security.HashService should use when computing the Hash, or
null if the default algorithm configuration of the HashService should be used.Copyright © 2020. All rights reserved.