|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.pkcs.pkcs12.Attributes | +--iaik.pkcs.pkcs12.SafeBag
This class implements the PKCS#12 structure SafeBag.
The
PKCS#12 Personal Information Exchange Syntax Standard defines
the SafeBag
structure as collection of one particular
piece of information (a key, a certificate, ...) and some additional
attributes for forming the basic building block of a PFX PDU:
SafeBag :== SEQUENCE { bagType OBJECT IDENTIFIER, bagContent [0] EXPLICIT ANY DEFINED BY bagType, bagAttributes Attributes OPTIONAL -- from X.501 }
AuthenticatedSafe
,
PKCS12
Constructor Summary | |
protected |
SafeBag()
Default Constructor. |
protected |
SafeBag(String friendlyName,
byte[] localKeyID)
Creates a new SafeBag from a friendly name and a local key ID. |
Method Summary | |
static SafeBag |
create(ObjectID oid)
Creates a new SafeBag from a given ObjectID. |
protected static byte[] |
encodeSafeContents(SafeBag[] safeBags)
Creates the SafeContants byte array as needed by AuthenticatedSafe from an array of SafeBags. |
protected static ASN1Object |
encodeSafeContentsAsASN1Object(SafeBag[] safeBags)
Creates the SafeContants ASN1Object as needed by SafeContentsBag from an array of SafeBags. |
ObjectID |
getBagType()
Returns the type of this SafeBag. |
protected static SafeBag[] |
parseSafeContents(ASN1Object safeContents)
Parses the SafeContents data structure and returns the included SafeBags. |
protected static SafeBag[] |
parseSafeContents(byte[] safeContents)
Parses the SafeContents data structure and returns the included SafeBags. |
static void |
register(ObjectID oid,
Class cls)
Registers a new implementation for a PKCS#12 SafeBag defined through the given ObjectID. |
String |
toString()
Returns a String representation of these Attributes. |
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 |
Methods inherited from interface iaik.asn1.ASN1Type |
decode, toASN1Object |
Constructor Detail |
protected SafeBag()
protected SafeBag(String friendlyName, byte[] localKeyID)
Method Detail |
public static SafeBag create(ObjectID oid) throws PKCSException
oid
- the object id of the bag to createPKCSException
- if there is no bag type registered for the given object idpublic static void register(ObjectID oid, Class cls)
oid
- the object id of the PKCS#12 SafeBag to be registeredcls
- the implementing classprotected static byte[] encodeSafeContents(SafeBag[] safeBags) throws CodingException
safeBags
- the SafeBags to encodeprotected static ASN1Object encodeSafeContentsAsASN1Object(SafeBag[] safeBags) throws CodingException
safeBags
- the SafeBags to encodeprotected static SafeBag[] parseSafeContents(byte[] safeContents) throws CodingException
safeContents
- the SafeContents ASN.1 structure as byte arrayCodingException
- if an error occurs during parsing the safe contentsprotected static SafeBag[] parseSafeContents(ASN1Object safeContents) throws CodingException
safeContents
- the SafeContents ASN.1 structure as ASN1ObjectCodingException
- if an error occurs during parsing the safe contentspublic ObjectID getBagType()
Possible values are:
ObjectID
public String toString()
toString
in class Attributes
|
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). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |