public class SecretBag extends SafeBag
SafeBag
,
Attributes
Modifier and Type | Field and Description |
---|---|
protected ASN1Object |
secret_object
The context specific secret ASN.1 object.
|
protected ObjectID |
secret_type
The type of the secret
|
Modifier | Constructor and Description |
---|---|
protected |
SecretBag()
Default constructor.
|
|
SecretBag(ASN1Object object,
ObjectID secretTypeID)
Creates a new SecretBag from an ASN1Object and the
corresponding secret type ID.
|
|
SecretBag(ASN1Object object,
ObjectID secretTypeID,
java.lang.String friendlyName,
byte[] localKeyID)
Creates a new SecretBag from an ASN1Object, secret type ID,
a friendlyName and a locakKeyID.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(ASN1Object obj)
Decodes the SecretBag given as ASN1Object.
|
ASN1Object |
getSecretObject()
Returns the ASN1 content of this SecretBag.
|
ObjectID |
getSecretType()
Returns the ASN1 content of this SecretBag.
|
ASN1Object |
toASN1Object()
Returns this SecretBag as ASN1Object.
|
java.lang.String |
toString()
Returns a String representation of this SecretBag.
|
create, encodeSafeContents, encodeSafeContentsAsASN1Object, getBagType, parseSafeContents, parseSafeContents, register
getAttributes, getFriendlyName, getLocalKeyID, setAttributes, setFriendlyName, setLocalKeyID
protected ASN1Object secret_object
protected ObjectID secret_type
protected SecretBag()
public SecretBag(ASN1Object object, ObjectID secretTypeID)
object
- the ASN.1 objectsecretTypeID
- the type idpublic SecretBag(ASN1Object object, ObjectID secretTypeID, java.lang.String friendlyName, byte[] localKeyID)
object
- the ASN.1 objectsecretTypeID
- the type idfriendlyName
- the friendly namelocalKeyID
- the local key idpublic ASN1Object getSecretObject()
public ObjectID getSecretType()
public void decode(ASN1Object obj) throws CodingException
obj
- the SecretBag as ASN1ObjectCodingException
- if the SecretBag cannot be decodedpublic ASN1Object toASN1Object() throws CodingException
CodingException
- if an de/encoding error occurs