public class HmacAesAeadAlgorithm extends Object implements AeadAlgorithm
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BLOCK_BYTE_SIZE |
protected static int |
BLOCK_SIZE |
protected static String |
DECRYPT_NO_IV |
protected boolean |
gcm |
protected static int |
GCM_IV_SIZE |
protected int |
ivBitLength |
protected static String |
KEY_ALG_NAME |
protected int |
keyBitLength |
protected int |
tagBitLength |
| Constructor and Description |
|---|
HmacAesAeadAlgorithm(int keyBitLength) |
HmacAesAeadAlgorithm(String id,
io.jsonwebtoken.impl.security.DefaultMacAlgorithm sigAlg) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
assertBytes(byte[] bytes,
String type,
int requiredBitLen) |
protected SecretKey |
assertKey(SecretKey key) |
void |
decrypt(DecryptAeadRequest req,
OutputStream plaintext) |
void |
encrypt(AeadRequest req,
AeadResult res) |
protected byte[] |
ensureInitializationVector(Request<?> request) |
boolean |
equals(Object obj) |
protected SecretKey |
generateCek(KeyRequest<?> request) |
String |
getId() |
protected AlgorithmParameterSpec |
getIvSpec(byte[] iv) |
protected String |
getJcaName(Request<?> request) |
int |
getKeyBitLength() |
int |
hashCode() |
protected JcaTemplate |
jca() |
protected JcaTemplate |
jca(Request<?> request) |
SecretKeyBuilder |
key() |
protected static String |
lengthMsg(String id,
String type,
int requiredLengthInBits,
long actualLengthInBits) |
String |
toString() |
protected byte[] |
validateLength(SecretKey key,
int requiredBitLength,
boolean propagate) |
protected byte[] |
withCipher(Cipher cipher,
InputStream in,
InputStream aad,
OutputStream out) |
protected void |
withCipher(Cipher cipher,
InputStream in,
OutputStream out) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdprotected static final String KEY_ALG_NAME
protected static final int BLOCK_SIZE
protected static final int BLOCK_BYTE_SIZE
protected static final int GCM_IV_SIZE
protected static final String DECRYPT_NO_IV
protected final int keyBitLength
protected final int ivBitLength
protected final int tagBitLength
protected final boolean gcm
public HmacAesAeadAlgorithm(String id, io.jsonwebtoken.impl.security.DefaultMacAlgorithm sigAlg)
public HmacAesAeadAlgorithm(int keyBitLength)
public int getKeyBitLength()
getKeyBitLength in interface KeyLengthSupplierpublic SecretKeyBuilder key()
key in interface KeyBuilderSupplier<SecretKey,SecretKeyBuilder>public void encrypt(AeadRequest req, AeadResult res)
encrypt in interface AeadAlgorithmpublic void decrypt(DecryptAeadRequest req, OutputStream plaintext)
decrypt in interface AeadAlgorithmprotected static String lengthMsg(String id, String type, int requiredLengthInBits, long actualLengthInBits)
protected byte[] validateLength(SecretKey key, int requiredBitLength, boolean propagate)
protected byte[] assertBytes(byte[] bytes,
String type,
int requiredBitLen)
protected byte[] ensureInitializationVector(Request<?> request)
protected AlgorithmParameterSpec getIvSpec(byte[] iv)
protected void withCipher(Cipher cipher, InputStream in, OutputStream out) throws Exception
Exceptionprotected byte[] withCipher(Cipher cipher, InputStream in, InputStream aad, OutputStream out) throws Exception
Exceptionpublic String getId()
getId in interface Identifiableprotected JcaTemplate jca()
protected JcaTemplate jca(Request<?> request)
protected SecretKey generateCek(KeyRequest<?> request)
Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.