Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-05


oracle.security.crypto.cert
Class PKCS12ShroudedKeyBag

java.lang.Object
  extended by oracle.security.crypto.cert.PKCS12Bag
      extended by oracle.security.crypto.cert.PKCS12ShroudedKeyBag

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class PKCS12ShroudedKeyBag
extends PKCS12Bag

A PKCS #12 shrouded key bag. The key is shrouded with PKCS #8.

See Also:
Serialized Form

Constructor Summary
PKCS12ShroudedKeyBag()
          Creates a new empty instance.
PKCS12ShroudedKeyBag(PKCS12Safe parent)
           
PKCS12ShroudedKeyBag(PKCS12Safe parent, oracle.security.crypto.asn1.ASN1Sequence s)
           
PKCS12ShroudedKeyBag(PKCS12Safe parent, java.io.InputStream is)
           
PKCS12ShroudedKeyBag(PKCS12Safe parent, oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8)
           

 

Method Summary
 char[] getPasswd()
          Returns the password to use for encrypting and/or decrypting the enclosed PrivateKeyPKCS8.
 java.lang.String getPassword()
          Deprecated. Use getPasswd()
 oracle.security.crypto.core.PrivateKeyPKCS8 getPKCS8()
           
 oracle.security.crypto.core.PrivateKey getPrivateKey()
           
 void input(oracle.security.crypto.asn1.ASN1Sequence s)
          Reconstructs this object from its representation as an ASN.1 sequence.
 void input(java.io.InputStream is)
          Reconstructs this object by reading its DER encoding from the specified input stream.
 int length()
          Returns the length of this object's DER encoding.
 void output(java.io.OutputStream os)
          Outputs the DER encoding of this object to the specified output stream.
 void setPasswd(char[] passwd)
          Sets the password to use for encrypting and/or decrypting the enclosed PrivateKeyPKCS8.
 void setPassword(java.lang.String passwd)
          Deprecated. Use setPasswd(char[])
 void setPKCS8(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8)
           
 java.lang.String toString()
          Returns a string representation of this object.

 

Methods inherited from class oracle.security.crypto.cert.PKCS12Bag
getFriendlyName, getLocalKeyID, inputBag, outputAttrsASN1, readExternal, setFriendlyName, setLocalKeyID, writeExternal

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

PKCS12ShroudedKeyBag

public PKCS12ShroudedKeyBag()
Creates a new empty instance. This constructor is to be used with serialization or with the input method.

PKCS12ShroudedKeyBag

public PKCS12ShroudedKeyBag(PKCS12Safe parent)

PKCS12ShroudedKeyBag

public PKCS12ShroudedKeyBag(PKCS12Safe parent,
                            oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8)

PKCS12ShroudedKeyBag

public PKCS12ShroudedKeyBag(PKCS12Safe parent,
                            java.io.InputStream is)
                     throws java.io.IOException
Throws:
java.io.IOException

PKCS12ShroudedKeyBag

public PKCS12ShroudedKeyBag(PKCS12Safe parent,
                            oracle.security.crypto.asn1.ASN1Sequence s)
                     throws java.io.IOException
Throws:
java.io.IOException

Method Detail

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Reconstructs this object by reading its DER encoding from the specified input stream. The enclosed PrivateKeyPKCS8 is not decrypted until getPrivateKey() is called.
Parameters:
is - The input stream from which this object will be read.
Throws:
java.io.IOException
See Also:
setPassword(java.lang.String)

input

public void input(oracle.security.crypto.asn1.ASN1Sequence s)
           throws java.io.IOException
Reconstructs this object from its representation as an ASN.1 sequence. The enclosed PrivateKeyPKCS8 is not decrypted until getPrivateKey() is called.
Parameters:
s - The ASN.1 sequence representation of this object.
Throws:
java.io.IOException
See Also:
setPassword(java.lang.String)

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Outputs the DER encoding of this object to the specified output stream.
Parameters:
os - The output stream to which the object will be written.
Throws:
java.io.IOException

length

public int length()
Returns the length of this object's DER encoding.
Returns:
The length of this object's DER encoding

setPassword

public void setPassword(java.lang.String passwd)
Deprecated. Use setPasswd(char[])
Sets the password to use for encrypting and/or decrypting the enclosed PrivateKeyPKCS8. By default, the parent PKCS12Safe's password is used.
Parameters:
passwd - The PrivateKeyPKCS8 password.

setPasswd

public void setPasswd(char[] passwd)
Sets the password to use for encrypting and/or decrypting the enclosed PrivateKeyPKCS8. By default, the parent PKCS12Safe's password is used.
Parameters:
passwd - The PrivateKeyPKCS8 password.

getPassword

public java.lang.String getPassword()
Deprecated. Use getPasswd()
Returns the password to use for encrypting and/or decrypting the enclosed PrivateKeyPKCS8. By default, the parent PKCS12Safe's password is used.

getPasswd

public char[] getPasswd()
Returns the password to use for encrypting and/or decrypting the enclosed PrivateKeyPKCS8. By default, the parent PKCS12Safe's password is used.

getPrivateKey

public oracle.security.crypto.core.PrivateKey getPrivateKey()

getPKCS8

public oracle.security.crypto.core.PrivateKeyPKCS8 getPKCS8()

setPKCS8

public void setPKCS8(oracle.security.crypto.core.PrivateKeyPKCS8 pkcs8)

toString

public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object

Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-05


Copyright © 2005, 2013, Oracle. All rights reserved.