public class RSAKeySecret extends Object implements SignatureSecret
Constructor and Description |
---|
RSAKeySecret(byte[] publicKey)
Create an RSA public key secret with the given public key value.
|
RSAKeySecret(byte[] privateKey,
byte[] publicKey)
Create an RSA public key secret with the given private and public key value.
|
RSAKeySecret(PrivateKey privateKey,
PublicKey publicKey) |
RSAKeySecret(PublicKey publicKey)
Construct an RSA public key secret with the given public key.
|
RSAKeySecret(String publicKey)
Create an RSA public key secret with the given public key value.
|
RSAKeySecret(String privateKey,
String publicKey)
Create an RSA public key secret with the given private and public key.
|
RSAKeySecret(X509Certificate certificate)
Create an RSA public key secret with the given X509 certificate.
|
Modifier and Type | Method and Description |
---|---|
static PrivateKey |
createPrivateKey(byte[] privateKey)
Creates a private key from the PKCS#8-encoded value of the given bytes.
|
static PublicKey |
createPublicKey(byte[] publicKey)
Creates a public key from the X509-encoded value of the given bytes.
|
PrivateKey |
getPrivateKey()
The private key.
|
PublicKey |
getPublicKey()
The public key.
|
public RSAKeySecret(PrivateKey privateKey, PublicKey publicKey)
public RSAKeySecret(byte[] privateKey, byte[] publicKey)
privateKey
- The value of the private key.publicKey
- The value of the public key.public RSAKeySecret(String privateKey, String publicKey)
privateKey
- The value of the private key.publicKey
- The value of the public key.public RSAKeySecret(PublicKey publicKey)
publicKey
- The public key.public RSAKeySecret(byte[] publicKey)
publicKey
- The value of the public key.public RSAKeySecret(String publicKey)
publicKey
- The value of the public key.public RSAKeySecret(X509Certificate certificate)
certificate
- The certificate.public static PublicKey createPublicKey(byte[] publicKey)
publicKey
- The X509-encoded public key bytes.public static PrivateKey createPrivateKey(byte[] privateKey)
privateKey
- The PKCS#8-encoded private key bytes.public PrivateKey getPrivateKey()
public PublicKey getPublicKey()
Copyright © 2019. All rights reserved.