iaik.pkcs.pkcs12
Class SecretBag

java.lang.Object
  |
  +--iaik.pkcs.pkcs12.Attributes
        |
        +--iaik.pkcs.pkcs12.SafeBag
              |
              +--iaik.pkcs.pkcs12.SecretBag
All Implemented Interfaces:
ASN1Type

public class SecretBag
extends SafeBag

This class contains a context specific secret ASN.1 object and any associated attributes.

Version:
File Revision 6
See Also:
SafeBag, Attributes

Field Summary
protected  ASN1Object secret_object
          The context specific secret ASN.1 object.
protected  ObjectID secret_type
          The type of the secret
 
Constructor Summary
protected SecretBag()
          Default constructor.
  SecretBag(ASN1Object object, ObjectID secretTypeID)
          Creates a new SecretBag from an alreay existing ASN1Object and the corresponding secret type ID.
  SecretBag(ASN1Object object, ObjectID secretTypeID, String friendlyName, byte[] localKeyID)
          Creates a new SecretBag from an alreay existing CRL, secret type ID, a friendlyName and a locakKeyID.
 
Method Summary
 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.
 String toString()
          Returns a String representation of this SecretBag.
 
Methods inherited from class iaik.pkcs.pkcs12.SafeBag
create, encodeSafeContents, encodeSafeContentsAsASN1Object, getBagType, parseSafeContents, parseSafeContents, register
 
Methods inherited from class iaik.pkcs.pkcs12.Attributes
getAttributes, getFriendlyName, getLocalKeyID, setAttributes, setFriendlyName, setLocalKeyID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

secret_object

protected ASN1Object secret_object
The context specific secret ASN.1 object.

secret_type

protected ObjectID secret_type
The type of the secret
Constructor Detail

SecretBag

protected SecretBag()
Default constructor.

SecretBag

public SecretBag(ASN1Object object,
                 ObjectID secretTypeID)
Creates a new SecretBag from an alreay existing ASN1Object and the corresponding secret type ID.

SecretBag

public SecretBag(ASN1Object object,
                 ObjectID secretTypeID,
                 String friendlyName,
                 byte[] localKeyID)
Creates a new SecretBag from an alreay existing CRL, secret type ID, a friendlyName and a locakKeyID.
Method Detail

getSecretObject

public ASN1Object getSecretObject()
Returns the ASN1 content of this SecretBag.

getSecretType

public ObjectID getSecretType()
Returns the ASN1 content of this SecretBag.

decode

public void decode(ASN1Object obj)
            throws CodingException
Decodes the SecretBag given as ASN1Object.
Parameters:
obj - the SecretBag as ASN1Object
Throws:
CodingException - if the SecretBag cannot be decoded

toASN1Object

public ASN1Object toASN1Object()
                        throws CodingException
Returns this SecretBag as ASN1Object.
Returns:
this SecretBag as ASN1Object

toString

public String toString()
Returns a String representation of this SecretBag.
Overrides:
toString in class SafeBag

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK