public class PartialHashTreeProcessor
extends java.lang.Object
| Constructor and Description |
|---|
PartialHashTreeProcessor(org.bouncycastle.asn1.tsp.PartialHashtree tree) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsHash(byte[] hash)
Checks whether a PartialHashtree (RFC4998) contains a given hash.
|
byte[] |
getHash(org.bouncycastle.operator.DigestCalculator digestCalculator)
Compute a hash over the whole partialHashTree:
- Concatenate all the hashes contained in the partial hash tree;
- Generate a hash over the concatenated hashes, using a provided
DigestCalculator. |
void |
verifyContainsHash(byte[] hash)
Checks whether a PartialHashtree (RFC4998) contains a given hash.
|
public PartialHashTreeProcessor(org.bouncycastle.asn1.tsp.PartialHashtree tree)
public byte[] getHash(org.bouncycastle.operator.DigestCalculator digestCalculator)
DigestCalculator.digestCalculator - the DigestCalculator to use in order to generate the hashpublic void verifyContainsHash(byte[] hash)
throws PartialHashTreeVerificationException
hash - the hash to checkPartialHashTreeVerificationException - if the hash is not present in the
PartialHashtreepublic boolean containsHash(byte[] hash)
hash - the hash to check