public class DataUriKeyReader extends Object implements KeyReader
data:{key-mediatype};kid={key-identifier};base64,{encoded-key-data}
In addition to the media type of the key, the key identifier must be specified using
url escaping as the value of the 'kid' parameter.
application/pkcs8 media type is supported.
PKCS#8 object in the data section MUST be DER-ASN.1-encoded PrivateKeyInfo.application/x-pem-file media type is supported.
The public key in the PEM must be DER-ASN.1-encoded SubjectPublicKeyInfo.DataUriUtil| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_URI_PEM_HEADER |
static String |
DATA_URI_PKCS8_HEADER |
| Constructor and Description |
|---|
DataUriKeyReader() |
DataUriKeyReader(Provider provider) |
| Modifier and Type | Method and Description |
|---|---|
PrivateKey |
readPrivateKey(Reader reader) |
PublicKey |
readPublicKey(Reader reader) |
public static final String DATA_URI_PKCS8_HEADER
public static final String DATA_URI_PEM_HEADER
public DataUriKeyReader()
public DataUriKeyReader(Provider provider)
public PrivateKey readPrivateKey(Reader reader) throws CannotRetrieveKeyException
readPrivateKey in interface KeyReaderCannotRetrieveKeyExceptionpublic PublicKey readPublicKey(Reader reader) throws CannotRetrieveKeyException
readPublicKey in interface KeyReaderCannotRetrieveKeyExceptionCopyright © 2017 Atlassian. All rights reserved.