T
- Type produced by decode operation.public abstract class AbstractPrivateKeyDecoder<T> extends Object implements ASN1Decoder<T>
Constructor and Description |
---|
AbstractPrivateKeyDecoder() |
Modifier and Type | Method and Description |
---|---|
T |
decode(byte[] encoded,
Object... args)
Produces an object from an encoded representation.
|
protected abstract T |
decodeASN1(byte[] encoded)
Decodes the given raw ASN.1 encoded data into a private key of the type supported by this class.
|
protected abstract byte[] |
decryptKey(byte[] encrypted,
char[] password)
Decrypts an encrypted key in either PKCS#8 or OpenSSL "traditional" format.
|
protected byte[] |
tryConvertPem(byte[] input)
Tests the given encoded input and converts it to PEM if it is detected, stripping out any header/footer data in the
process.
|
public T decode(byte[] encoded, Object... args) throws EncodingException
ASN1Decoder
decode
in interface ASN1Decoder<T>
encoded
- ASN.1 encoded data.args
- Additional data required to perform decoding.EncodingException
- on encoding errors.protected byte[] tryConvertPem(byte[] input)
input
- Encoded data that may be PEM encoded.protected abstract byte[] decryptKey(byte[] encrypted, char[] password)
encrypted
- Encoded encrypted key data.password
- Password to decrypt key.protected abstract T decodeASN1(byte[] encoded)
encoded
- Encoded ASN.1 data.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.