[IMPLICIT TAGS]
OneAsymmetricKey ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] Attributes OPTIONAL,
...,
[[2: publicKey [1] PublicKey OPTIONAL ]],
...
}
PrivateKeyInfo ::= OneAsymmetricKey
Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
{ PUBLIC-KEY,
{ PrivateKeyAlgorithms } }
PrivateKey ::= OCTET STRING
-- Content varies based on type of key. The
-- algorithm identifier dictates the format of
-- the key.
PublicKey ::= BIT STRING
-- Content varies based on type of key. The
-- algorithm identifier dictates the format of
-- the key.
Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
| Modifier and Type | Field and Description |
|---|---|
| private ASN1Set | |
| private ASN1OctetString | |
| private AlgorithmIdentifier | |
| private ASN1BitString | |
| private ASN1Integer |
| Access | Constructor and Description |
|---|---|
| public | PrivateKeyInfo(AlgorithmIdentifier
algorithm identifier for the private key. privateKeyAlgorithm, byte[] byte encoding of the private key, used as a raw encoding. privateKey)Construct a PrivateKeyInfo around a raw encoding. |
| public | PrivateKeyInfo(AlgorithmIdentifier
algorithm identifier for the private key. privateKeyAlgorithm, ASN1Encodable the ASN.1 structure/primitive representing the private key. privateKey)Construct a PrivateKeyInfo around an ASN.1 structure/primitive. |
| public | PrivateKeyInfo(AlgorithmIdentifier
algorithm identifier for the private key. privateKeyAlgorithm, ASN1Encodable the ASN.1 structure/primitive representing the private key. privateKey, ASN1Set attributes associated with private key. attributes)Construct a PrivateKeyInfo around an ASN.1 structure/primitive with attributes. |
| public | PrivateKeyInfo(AlgorithmIdentifier
algorithm identifier for the private key. privateKeyAlgorithm, byte[] byte encoding of the private key, used as a raw encoding. privateKey, ASN1Set attributes associated with private key. attributes)Construct a PrivateKeyInfo around an ASN.1 structure/primitive with attributes. |
| public | PrivateKeyInfo(AlgorithmIdentifier
algorithm identifier for the private key. privateKeyAlgorithm, ASN1Encodable the ASN.1 structure/primitive representing the private key. privateKey, ASN1Set attributes associated with private key. attributes, byte[] public key encoding. publicKey)Construct a PrivateKeyInfo around an ASN.1 structure/primitive with attributes and the public key. |
| public | PrivateKeyInfo(AlgorithmIdentifier
algorithm identifier for the private key. privateKeyAlgorithm, byte[] byte encoding of the private key, used as a raw encoding. privateKey, ASN1Set attributes associated with private key. attributes, byte[] public key encoding. publicKey)Construct a PrivateKeyInfo around a raw encoding with attributes and the public key. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ASN1Set | |
| public static PrivateKeyInfo | |
| public static PrivateKeyInfo | |
| public ASN1OctetString | |
| public AlgorithmIdentifier | |
| public int | |
| public ASN1BitString | Returns: the public key as the raw bit string...for when the public key is raw bits. |
| public ASN1Integer | |
| private static int | |
| public boolean | Returns: true if public included, otherwise false.Return true if a public key is present, false otherwise. |
| public ASN1Encodable | |
| public ASN1Encodable | Returns: the public key as an ASN.1 primitive.for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException. |
| public ASN1Primitive | toASN1Primitive()
Implements abstract org. Implements org. Method providing a primitive representation of this object suitable for encoding. |
| attributes | back to summary |
|---|---|
| private ASN1Set attributes | |
| privateKey | back to summary |
|---|---|
| private ASN1OctetString privateKey | |
| privateKeyAlgorithm | back to summary |
|---|---|
| private AlgorithmIdentifier privateKeyAlgorithm | |
| publicKey | back to summary |
|---|---|
| private ASN1BitString publicKey | |
| version | back to summary |
|---|---|
| private ASN1Integer version | |
| PrivateKeyInfo | back to summary |
|---|---|
| public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey) throws IOException Construct a PrivateKeyInfo around a raw encoding.
| |
| PrivateKeyInfo | back to summary |
|---|---|
| public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, ASN1Encodable privateKey) throws IOException Construct a PrivateKeyInfo around an ASN.1 structure/primitive.
| |
| PrivateKeyInfo | back to summary |
|---|---|
| public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, ASN1Encodable privateKey, ASN1Set attributes) throws IOException Construct a PrivateKeyInfo around an ASN.1 structure/primitive with attributes.
| |
| PrivateKeyInfo | back to summary |
|---|---|
| public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, ASN1Set attributes) throws IOException Construct a PrivateKeyInfo around an ASN.1 structure/primitive with attributes.
| |
| PrivateKeyInfo | back to summary |
|---|---|
| public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, ASN1Encodable privateKey, ASN1Set attributes, byte[] publicKey) throws IOException Construct a PrivateKeyInfo around an ASN.1 structure/primitive with attributes and the public key.
| |
| PrivateKeyInfo | back to summary |
|---|---|
| public PrivateKeyInfo(AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, ASN1Set attributes, byte[] publicKey) Construct a PrivateKeyInfo around a raw encoding with attributes and the public key.
| |
| PrivateKeyInfo | back to summary |
|---|---|
| private PrivateKeyInfo(ASN1Sequence seq) | |
| getAttributes | back to summary |
|---|---|
| public ASN1Set getAttributes() | |
| getInstance | back to summary |
|---|---|
| public static PrivateKeyInfo getInstance(ASN1TaggedObject obj, boolean explicit) | |
| getInstance | back to summary |
|---|---|
| public static PrivateKeyInfo getInstance(Object obj) | |
| getPrivateKey | back to summary |
|---|---|
| public ASN1OctetString getPrivateKey() | |
| getPrivateKeyAlgorithm | back to summary |
|---|---|
| public AlgorithmIdentifier getPrivateKeyAlgorithm() | |
| getPrivateKeyLength | back to summary |
|---|---|
| public int getPrivateKeyLength() | |
| getPublicKeyData | back to summary |
|---|---|
| public ASN1BitString getPublicKeyData() for when the public key is raw bits.
| |
| getVersion | back to summary |
|---|---|
| public ASN1Integer getVersion() | |
| getVersionValue | back to summary |
|---|---|
| private static int getVersionValue(ASN1Integer version) | |
| hasPublicKey | back to summary |
|---|---|
| public boolean hasPublicKey() Return true if a public key is present, false otherwise.
| |
| parsePrivateKey | back to summary |
|---|---|
| public ASN1Encodable parsePrivateKey() throws IOException | |
| parsePublicKey | back to summary |
|---|---|
| public ASN1Encodable parsePublicKey() throws IOException for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException.
| |
| toASN1Primitive | back to summary |
|---|---|
| public ASN1Primitive toASN1Primitive() Implements abstract org. Implements org. Doc from org. Method providing a primitive representation of this object suitable for encoding.
| |