|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.security.pkcsutil.PKCSDerObject
|
+--com.ibm.security.pkcs12.SafeContents
Implements the SafeContents data type as defined in PKCS #12:
SafeContents objects are immutable; they cannot be changed once created.
SafeBag| Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
provider |
| Constructor Summary | |
SafeContents(byte[] der)
Create a SafeContents object with a DER byte array. |
|
SafeContents(byte[] der,
String provider)
Create a SafeContents object with a DER byte array. |
|
SafeContents(SafeBag[] bags)
Create a SafeContents object with the input SafeBags. |
|
SafeContents(SafeBag[] bags,
String provider)
Create a SafeContents object with the input SafeBags. |
|
SafeContents(String filename,
boolean base64)
Create a SafeContents with the filename of the DER-encoded or BASE64-encoded object. |
|
SafeContents(String filename,
boolean base64,
String provider)
Create a SafeContents with the filename of the DER-encoded or BASE64-encoded object. |
|
| Method Summary | |
SafeContents |
addBags(SafeBag[] inBags)
Add one or more SafeBags to this object and return the result in a new SafeContents * object. |
Object |
clone()
Creates a clone of this SafeContents object. |
protected void |
decode(com.ibm.security.pkcs12.DerValue encoding)
Initialize a SafeContents object from an input stream. |
void |
encode(OutputStream out)
Encodes this object to a DER OutputStream. |
boolean |
equals(Object obj)
Determines if this SafeContents object is equivalent to the input object. |
SafeBag[] |
getSafeBags()
Returns a copy of the SafeBags present in this SafeContents object. |
ContentInfo |
protect(int mode)
Protect the data privacy of this SafeContents object according to the input mode. |
String |
toString()
Returns a string representation of this SafeContents object. |
| Methods inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
decode,
decode,
encode,
getObjectIdentifier,
hashCode,
read,
readBASE64,
write,
write,
writeBASE64 |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public SafeContents(byte[] der)
throws IOException
public SafeContents(byte[] der,
String provider)
throws IOException
public SafeContents(SafeBag[] bags)
throws IOException
public SafeContents(SafeBag[] bags,
String provider)
throws IOException
public SafeContents(String filename,
boolean base64)
throws IOException
filename - name of the DER-encoded or base64-encoded objectbase64 - true if BASE64-encoded, false if DER-encoded
public SafeContents(String filename,
boolean base64,
String provider)
throws IOException
filename - name of the DER-encoded or base64-encoded objectbase64 - true if BASE64-encoded, false if DER-encodedprovider - a provider to be used| Method Detail |
public void encode(OutputStream out)
throws IOException
out - the DER OutputStream to write the encoded data to.public SafeContents addBags(SafeBag[] inBags)
bag - the SafeBags to add.public SafeBag[] getSafeBags()
public ContentInfo protect(int mode)
throws IOException,
PKCSException
mode - the privacy mode to use. Valid values are PKCS12.NO-ENCRYPT
for no data privacy or PKCS12.PASSWD_ENCRYPT for password-based
encryption.public Object clone()
public boolean equals(Object obj)
other - the object to compare this one to.public String toString()
protected void decode(com.ibm.security.pkcs12.DerValue encoding)
throws IOException
encoding - an input stream with a DER-encoded SafeContents object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||