Top Description Fields Constructors Methods
org.bouncycastle.asn1.tsp

public Class PartialHashtree

extends ASN1Object
Class Inheritance
Imports
java.util.Enumeration, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .DEROctetString, .DERSequence, org.bouncycastle.util.Arrays

Implementation of PartialHashtree, as defined in RFC 4998.

The ASN.1 notation for a PartialHashTree is:

PartialHashtree ::= SEQUENCE OF OCTET STRING

Field Summary

Modifier and TypeField and Description
private final ASN1Sequence
values

Hash values that constitute the hash tree, as ASN.1 Octet Strings.

Constructor Summary

AccessConstructor and Description
private
public
PartialHashtree(byte[] values)

public
PartialHashtree(byte[][] values)

Method Summary

Modifier and TypeMethod and Description
public boolean
containsHash(byte[] hash)

public static PartialHashtree

Returns:

a PartialHashtree instance, or null.
getInstance
(final Object
the object we want converted.
obj
)

Return a PartialHashtree from the given object.

public int
public byte[][]
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

valuesback to summary
private final ASN1Sequence values

Hash values that constitute the hash tree, as ASN.1 Octet Strings.

Constructor Detail

PartialHashtreeback to summary
private PartialHashtree(final ASN1Sequence values)
PartialHashtreeback to summary
public PartialHashtree(byte[] values)
PartialHashtreeback to summary
public PartialHashtree(byte[][] values)

Method Detail

containsHashback to summary
public boolean containsHash(byte[] hash)
getInstanceback to summary
public static PartialHashtree getInstance(final Object obj)

Return a PartialHashtree from the given object.

Parameters
obj:Object

the object we want converted.

Returns:PartialHashtree

a PartialHashtree instance, or null.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getValueCountback to summary
public int getValueCount()
getValuesback to summary
public byte[][] getValues()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.