public abstract class RSAConfidentialKey extends ConfidentialKey
ConfidentialKey.
As per the design principle of ConfidentialKey, not exposing PrivateKey directly.
Define subtypes for different use cases.
| Constructor and Description |
|---|
RSAConfidentialKey(Class owner,
String shortName) |
RSAConfidentialKey(String id) |
| Modifier and Type | Method and Description |
|---|---|
String |
getEncodedPublicKey()
Gets base64-encoded public key.
|
protected RSAPrivateKey |
getPrivateKey()
Obtains the private key (lazily.)
|
RSAPublicKey |
getPublicKey() |
getId, load, storepublic RSAConfidentialKey(String id)
protected RSAPrivateKey getPrivateKey()
This method is not publicly exposed as per the design principle of ConfidentialKey.
Instead of exposing private key, define methods that use them in specific way, such as
RSADigitalSignatureConfidentialKey.
Error - If key cannot be loaded for some reasons, we fail.public RSAPublicKey getPublicKey()
public String getEncodedPublicKey()
Copyright © 2019. All rights reserved.