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

public Class KeySpecificInfo

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

ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See RFC 2631, or X9.42, for further details.
 KeySpecificInfo ::= SEQUENCE {
     algorithm OBJECT IDENTIFIER,
     counter OCTET STRING SIZE (4..4)
 }

Field Summary

Modifier and TypeField and Description
private ASN1ObjectIdentifier
private ASN1OctetString

Constructor Summary

AccessConstructor and Description
public
KeySpecificInfo(ASN1ObjectIdentifier
algorithm identifier for the CEK.
algorithm
,
ASN1OctetString
initial counter value for key derivation.
counter
)

Base constructor.

private

Method Summary

Modifier and TypeMethod and Description
public ASN1ObjectIdentifier

Returns:

CEK wrapping algorithm OID.
getAlgorithm
()

The object identifier for the CEK wrapping algorithm.

public ASN1OctetString

Returns:

initial counter value as a 4 byte octet string (big endian).
getCounter
()

The initial counter value for key derivation.

public static KeySpecificInfo

Returns:

a KeySpecificInfo
getInstance
(Object
an object for conversion or a byte[].
obj
)

Return a KeySpecificInfo object from the passed in object.

public ASN1Primitive

Returns:

a DERSequence containing the KeySpecificInfo values.
toASN1Primitive
()

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

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Return an ASN.1 primitive representation of this object.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

algorithmback to summary
private ASN1ObjectIdentifier algorithm
counterback to summary
private ASN1OctetString counter

Constructor Detail

KeySpecificInfoback to summary
public KeySpecificInfo(ASN1ObjectIdentifier algorithm, ASN1OctetString counter)

Base constructor.

Parameters
algorithm:ASN1ObjectIdentifier

algorithm identifier for the CEK.

counter:ASN1OctetString

initial counter value for key derivation.

KeySpecificInfoback to summary
private KeySpecificInfo(ASN1Sequence seq)

Method Detail

getAlgorithmback to summary
public ASN1ObjectIdentifier getAlgorithm()

The object identifier for the CEK wrapping algorithm.

Returns:ASN1ObjectIdentifier

CEK wrapping algorithm OID.

getCounterback to summary
public ASN1OctetString getCounter()

The initial counter value for key derivation.

Returns:ASN1OctetString

initial counter value as a 4 byte octet string (big endian).

getInstanceback to summary
public static KeySpecificInfo getInstance(Object obj)

Return a KeySpecificInfo object from the passed in object.

Parameters
obj:Object

an object for conversion or a byte[].

Returns:KeySpecificInfo

a KeySpecificInfo

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

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

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Return an ASN.1 primitive representation of this object.

Returns:ASN1Primitive

a DERSequence containing the KeySpecificInfo values.