public enum Algorithm extends Enum<Algorithm>
| Enum Constant and Description |
|---|
A128GCM
AES GCM using 128-bit key
|
A256GCM
AES GCM using 256-bit key
|
HS256 |
RSA256
RSASSA-PKCS1-v1_5 using SHA-256
|
RSA512
RSASSA-PKCS1-v1_5 using SHA-512
|
RSAOAEP
RSAES OAEP using default parameters
|
RSAOAEP256
RSAES OAEP using SHA-256 and MGF1 with SHA-256
|
| Modifier and Type | Method and Description |
|---|---|
protected static byte[] |
nonce(int noOfBytes) |
protected static byte[] |
sign(String algo,
PrivateKey privateKey,
String payload) |
static Algorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Algorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
protected static boolean |
verify(String algo,
PublicKey publicKey,
String payload,
byte[] signature) |
public static final Algorithm HS256
public static final Algorithm RSA256
public static final Algorithm RSA512
public static final Algorithm RSAOAEP
public static final Algorithm RSAOAEP256
public static final Algorithm A128GCM
public static final Algorithm A256GCM
public static Algorithm[] values()
for (Algorithm c : Algorithm.values()) System.out.println(c);
public static Algorithm valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullprotected static byte[] nonce(int noOfBytes)
protected static byte[] sign(String algo, PrivateKey privateKey, String payload)
Copyright © 2022. All rights reserved.