T - Type of output (e.g. byte[], string) produced by hash bean.public interface HashBean<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
compare(T hash,
Object... data)
Compares a known hash value with the hash of the given data.
|
T |
hash(Object... data)
Hashes the given data.
|
T hash(Object... data) throws CryptoException, StreamException
data - Data to hash. Callers should expect support for at least the following types: byte[],
CharSequence, InputStream, and Resource. Unless
otherwise noted, character data is processed in the UTF-8 character set; if another
character set is desired, the caller should convert to byte[] and provide the resulting
bytes.CryptoException - on hash computation errors.StreamException - on stream IO errors.boolean compare(T hash, Object... data) throws CryptoException, StreamException
hash - Known hash value.data - Data to hash.CryptoException - on hash computation errors.StreamException - on stream IO errors.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.