Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.pkix.primitive
Class PrivateKeyInfo

    java.lang.Object
      |
      +--org.mozilla.jss.pkix.primitive.PrivateKeyInfo

All Implemented Interfaces:
  ASN1Value, java.security.Key, java.security.PrivateKey, java.io.Serializable

public class PrivateKeyInfo
extends java.lang.Object
implements ASN1Value, java.security.PrivateKey

See Also:
  Serialized Form

Inner Class Summary
`static class` | `PrivateKeyInfo.Template` A template class for decoding PrivateKeyInfos from BER.

Field Summary
`private SET` | `attributes`
`private OCTET_STRING` | `privateKey`
`private AlgorithmIdentifier` | `privateKeyAlgorithm`
`private SEQUENCE` | `sequence`
`private static Tag` | `TAG`
`private static PrivateKeyInfo.Template` | `templateInstance`
`private INTEGER` | `version`

Fields inherited from interface java.security.PrivateKey
`serialVersionUID`

Constructor Summary
`private` | `PrivateKeyInfo()`
`` | `PrivateKeyInfo(INTEGER version, AlgorithmIdentifier privateKeyAlgorithm, OCTET_STRING privateKey, SET attributes)` Create a PrivateKeyInfo from its components.

Method Summary
`void` | `encode(java.io.OutputStream ostream)` Write this value's DER encoding to an output stream using its own base tag.
`void` | `encode(Tag implicitTag, java.io.OutputStream ostream)` Write this value's DER encoding to an output stream using an implicit tag.
`java.lang.String` | `getAlgorithm()`
`SET` | `getAttributes()` May return null if no attributes are present.
`byte[]` | `getEncoded()`
`java.lang.String` | `getFormat()`
`OCTET_STRING` | `getPrivateKey()`
`AlgorithmIdentifier` | `getPrivateKeyAlgorithm()`
`Tag` | `getTag()` Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
`static PrivateKeyInfo.Template` | `getTemplate()`
`INTEGER` | `getVersion()`

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

Field Detail

### version

    private INTEGER version

### privateKeyAlgorithm

    private AlgorithmIdentifier privateKeyAlgorithm

### privateKey

    private OCTET_STRING privateKey

### attributes

    private SET attributes

### sequence

    private SEQUENCE sequence

### TAG

    private static final Tag TAG

### templateInstance

    private static final PrivateKeyInfo.Template templateInstance

Constructor Detail

### PrivateKeyInfo

    private PrivateKeyInfo()

### PrivateKeyInfo

    public PrivateKeyInfo(INTEGER version,
                          AlgorithmIdentifier privateKeyAlgorithm,
                          OCTET_STRING privateKey,
                          SET attributes)

  Create a PrivateKeyInfo from its components.
  Parameters:
    `attributes` - May be null if there are no attributes, in which case the attributes field will be omitted from the DER encoding. Each element must be a org.mozilla.jss.pkix.primitive.Attribute.

Method Detail

### getVersion

    public INTEGER getVersion()

### getPrivateKeyAlgorithm

    public AlgorithmIdentifier getPrivateKeyAlgorithm()

### getAlgorithm

    public java.lang.String getAlgorithm()

  Specified by:
    `getAlgorithm` in interface `java.security.Key`

### getFormat

    public java.lang.String getFormat()

  Specified by:
    `getFormat` in interface `java.security.Key`

### getEncoded

    public byte[] getEncoded()

  Specified by:
    `getEncoded` in interface `java.security.Key`

### getPrivateKey

    public OCTET_STRING getPrivateKey()

### getAttributes

    public SET getAttributes()

  May return null if no attributes are present.

### getTag

    public Tag getTag()

  Description copied from interface: `ASN1Value`
  Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
  Specified by:
    `getTag` in interface `ASN1Value`

### encode

    public void encode(java.io.OutputStream ostream)
                throws java.io.IOException

  Description copied from interface: `ASN1Value`
  Write this value's DER encoding to an output stream using its own base tag.
  Specified by:
    `encode` in interface `ASN1Value`

### encode

    public void encode(Tag implicitTag,
                       java.io.OutputStream ostream)
                throws java.io.IOException

  Description copied from interface: `ASN1Value`
  Write this value's DER encoding to an output stream using an implicit tag.
  Specified by:
    `encode` in interface `ASN1Value`

### getTemplate

    public static PrivateKeyInfo.Template getTemplate()

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD