public final class JWK extends Object implements Crypto
ECDSA_ALGORITHMS
Constructor and Description |
---|
JWK(io.vertx.core.json.JsonObject json) |
JWK(String algorithm,
boolean isCertificate,
String pemPub,
String pemSec)
Creates a Key(Pair) from pem formatted strings.
|
JWK(String algorithm,
String hmac)
Creates a Symmetric Key from a base64 encoded string.
|
JWK(String algorithm,
String pemPub,
String pemSec)
Creates a Key(Pair) from pem formatted strings.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] payload) |
byte[] |
encrypt(byte[] payload) |
String |
getAlgorithm() |
String |
getId()
The key id or null.
|
String |
getLabel()
A not null label for the key, labels are the same for same algorithm, kid objects
but not necessarily different internal keys/certificates
|
byte[] |
sign(byte[] payload) |
boolean |
verify(byte[] expected,
byte[] payload) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ECDSALength, isECDSA
public JWK(String algorithm, String pemPub, String pemSec)
algorithm
- the algorithm e.g.: RS256pemPub
- the public key in PEM formatpemSec
- the private key in PEM formatpublic JWK(String algorithm, boolean isCertificate, String pemPub, String pemSec)
algorithm
- the algorithm e.g.: RS256isCertificate
- when true the public PEM is assumed to be a X509 CertificatepemPub
- the public key in PEM formatpemSec
- the private key in PEM formatpublic JWK(String algorithm, String hmac)
algorithm
- the algorithm e.g.: HS256hmac
- the symmetric keypublic JWK(io.vertx.core.json.JsonObject json)
Copyright © 2021 Eclipse. All rights reserved.