Top Description Inners Fields Constructors Methods
org.bouncycastle.crypto.util

public Class DEROtherInfo

extends Object
Class Inheritance
Imports
java.io.IOException, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Encoding, .ASN1OctetString, .ASN1Sequence, .ASN1TaggedObject, .DERSequence, .DERTaggedObject, org.bouncycastle.asn1.x509.AlgorithmIdentifier

Builder and holder class for preparing SP 800-56A compliant OtherInfo. The data is ultimately encoded as a DER SEQUENCE. Empty octet strings are used to represent nulls in compulsory fields.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DEROtherInfo.Builder

Builder to create OtherInfo

Field Summary

Modifier and TypeField and Description
private final ASN1Sequence

Constructor Summary

AccessConstructor and Description
private
public
DEROtherInfo(byte[] encoding)

Method Summary

Modifier and TypeMethod and Description
public byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sequenceback to summary
private final ASN1Sequence sequence

Constructor Detail

DEROtherInfoback to summary
private DEROtherInfo(DERSequence sequence)
DEROtherInfoback to summary
public DEROtherInfo(byte[] encoding)

Method Detail

getEncodedback to summary
public byte[] getEncoded() throws IOException
org.bouncycastle.crypto.util back to summary

public final Class DEROtherInfo.Builder

extends Object
Class Inheritance

Builder to create OtherInfo

Field Summary

Modifier and TypeField and Description
private final AlgorithmIdentifier
private final ASN1OctetString
private final ASN1OctetString
private ASN1TaggedObject
private ASN1TaggedObject

Constructor Summary

AccessConstructor and Description
public
Builder(DEROtherInfo
the algorithm associated with this invocation of the KDF.
otherInfo
)

Create a basic builder with just the compulsory fields.

public
Builder(AlgorithmIdentifier
the algorithm associated with this invocation of the KDF.
algorithmID
,
byte[]
sender party info.
partyUInfo
,
byte[]
receiver party info.
partyVInfo
)

Create a basic builder with just the compulsory fields.

Method Summary

Modifier and TypeMethod and Description
public DEROtherInfo

Returns:

an KTSOtherInfo containing the data.
build
()

Build the KTSOtherInfo.

public DEROtherInfo.Builder

Returns:

the current builder instance.
withSuppPrivInfo
(byte[]
supplementary private info.
suppPrivInfo
)

Add optional supplementary private info (DER tagged, implicit, 1).

public DEROtherInfo.Builder

Returns:

the current builder instance.
withSuppPubInfo
(byte[]
supplementary public info.
suppPubInfo
)

Add optional supplementary public info (DER tagged, implicit, 0).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmIDback to summary
private final AlgorithmIdentifier algorithmID
partyUVInfoback to summary
private final ASN1OctetString partyUVInfo
partyVInfoback to summary
private final ASN1OctetString partyVInfo
suppPrivInfoback to summary
private ASN1TaggedObject suppPrivInfo
suppPubInfoback to summary
private ASN1TaggedObject suppPubInfo

Constructor Detail

Builderback to summary
public Builder(DEROtherInfo otherInfo)

Create a basic builder with just the compulsory fields.

Parameters
otherInfo:DEROtherInfo

the algorithm associated with this invocation of the KDF.

Builderback to summary
public Builder(AlgorithmIdentifier algorithmID, byte[] partyUInfo, byte[] partyVInfo)

Create a basic builder with just the compulsory fields.

Parameters
algorithmID:AlgorithmIdentifier

the algorithm associated with this invocation of the KDF.

partyUInfo:byte[]

sender party info.

partyVInfo:byte[]

receiver party info.

Method Detail

buildback to summary
public DEROtherInfo build()

Build the KTSOtherInfo.

Returns:DEROtherInfo

an KTSOtherInfo containing the data.

withSuppPrivInfoback to summary
public DEROtherInfo.Builder withSuppPrivInfo(byte[] suppPrivInfo)

Add optional supplementary private info (DER tagged, implicit, 1).

Parameters
suppPrivInfo:byte[]

supplementary private info.

Returns:DEROtherInfo.Builder

the current builder instance.

withSuppPubInfoback to summary
public DEROtherInfo.Builder withSuppPubInfo(byte[] suppPubInfo)

Add optional supplementary public info (DER tagged, implicit, 0).

Parameters
suppPubInfo:byte[]

supplementary public info.

Returns:DEROtherInfo.Builder

the current builder instance.