public class JwkOctet extends Jwk
| Modifier and Type | Class and Description |
|---|---|
static class |
JwkOctet.Builder
Builder for
JwkOctet. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALG_HS256
HMAC using SHA-256.
|
static java.lang.String |
ALG_HS384
HMAC using SHA-384.
|
static java.lang.String |
ALG_HS512
HMAC using SHA-512.
|
static java.lang.String |
PARAM_OCTET_KEY
Key value.
|
ALG_NONE, KEY_TYPE_EC, KEY_TYPE_OCT, KEY_TYPE_RSA, NONE_JWK, OPERATION_DECRYPT, OPERATION_DERIVE_BITS, OPERATION_DERIVE_KEY, OPERATION_ENCRYPT, OPERATION_SIGN, OPERATION_UNWRAP_KEY, OPERATION_VERIFY, OPERATION_WRAP_KEY, PARAM_ALGORITHM, PARAM_KEY_ID, PARAM_KEY_TYPE, PARAM_OPERATIONS, PARAM_USE, USE_ENCRYPTION, USE_SIGNATURE| Modifier and Type | Method and Description |
|---|---|
static JwkOctet.Builder |
builder()
Create a builder instance.
|
byte[] |
doSign(byte[] bytesToSign) |
boolean |
doVerify(byte[] signedBytes,
byte[] signature) |
static JwkOctet |
fromJson(JsonObject json)
Create an instance from Json object.
|
byte[] |
getKeyBytes()
Get the bytes of the secret key.
|
getAlgorithm, getKeyId, getKeyType, getOperations, getUsage, sign, toString, verifySignaturepublic static final java.lang.String ALG_HS256
public static final java.lang.String ALG_HS384
public static final java.lang.String ALG_HS512
public static final java.lang.String PARAM_OCTET_KEY
public static JwkOctet.Builder builder()
JwkOctet instance.public static JwkOctet fromJson(JsonObject json)
json - with definition of this octet web keyfor generic method that can load any supported JWK type.public byte[] getKeyBytes()
public boolean doVerify(byte[] signedBytes,
byte[] signature)
public byte[] doSign(byte[] bytesToSign)
Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.