public class PubSecKeyOptions extends Object
Constructor and Description |
---|
PubSecKeyOptions()
Default constructor
|
PubSecKeyOptions(JsonObject json)
Constructor to create an options from JSON
|
PubSecKeyOptions(PubSecKeyOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm() |
Buffer |
getBuffer()
The PEM or Secret key buffer.
|
String |
getId() |
String |
getPublicKey()
Deprecated.
|
String |
getSecretKey()
Deprecated.
|
boolean |
isCertificate()
Deprecated.
|
boolean |
isSymmetric()
Deprecated.
|
PubSecKeyOptions |
setAlgorithm(String algorithm) |
PubSecKeyOptions |
setBuffer(Buffer buffer)
The PEM or Secret key buffer.
|
PubSecKeyOptions |
setBuffer(String buffer)
The PEM or Secret key buffer.
|
PubSecKeyOptions |
setCertificate(boolean certificate)
Deprecated.
|
PubSecKeyOptions |
setId(String id) |
PubSecKeyOptions |
setPublicKey(String publicKey)
Deprecated.
This setter ignored the PEM prefix and suffix which would assume the key to be RSA.
Use
setBuffer(String) with the full content of your OpenSSL pem file. A PEM file must
contain at least 3 lines:
-----BEGIN PUBLIC KEY---- ... -----END PUBLIC KEY--- |
PubSecKeyOptions |
setSecretKey(String secretKey)
Deprecated.
This setter ignored the PEM prefix and suffix which would assume the key to be RSA.
Use
setBuffer(String) with the full content of your OpenSSL pem file. A PEM file must
contain at least 3 lines:
-----BEGIN PRIVATE KEY---- ... -----END PRIVATE KEY--- |
PubSecKeyOptions |
setSymmetric(boolean symmetric)
Deprecated.
|
JsonObject |
toJson() |
public PubSecKeyOptions()
public PubSecKeyOptions(PubSecKeyOptions other)
other
- the options to copypublic PubSecKeyOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public String getAlgorithm()
public PubSecKeyOptions setAlgorithm(String algorithm)
public Buffer getBuffer()
UTF-8
. PEM files are expected to be US_ASCII
as the format uses a base64 encoding for the
payload.public PubSecKeyOptions setBuffer(String buffer)
UTF-8
. PEM files are expected to be US_ASCII
as the format uses a base64 encoding for the
payload.public PubSecKeyOptions setBuffer(Buffer buffer)
UTF-8
. PEM files are expected to be US_ASCII
as the format uses a base64 encoding for the
payload.public String getId()
public PubSecKeyOptions setId(String id)
@Deprecated public String getPublicKey()
@Deprecated public PubSecKeyOptions setPublicKey(String publicKey)
setBuffer(String)
with the full content of your OpenSSL pem file. A PEM file must
contain at least 3 lines:
-----BEGIN PUBLIC KEY---- ... -----END PUBLIC KEY---
publicKey
- the naked public key@Deprecated public String getSecretKey()
@Deprecated public PubSecKeyOptions setSecretKey(String secretKey)
setBuffer(String)
with the full content of your OpenSSL pem file. A PEM file must
contain at least 3 lines:
-----BEGIN PRIVATE KEY---- ... -----END PRIVATE KEY---
secretKey
- the naked public key@Deprecated public boolean isSymmetric()
@Deprecated public PubSecKeyOptions setSymmetric(boolean symmetric)
@Deprecated public boolean isCertificate()
@Deprecated public PubSecKeyOptions setCertificate(boolean certificate)
Copyright © 2021 Eclipse. All rights reserved.