public class SimpleAeadCipher extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SimpleAeadCipher.CipherOutput |
Modifier and Type | Field and Description |
---|---|
static String |
GCM_TRANSFORMATION_NAME |
Constructor and Description |
---|
SimpleAeadCipher(String algorithm,
int tagByteLength) |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] ciphertext,
byte[] tag,
byte[] aad,
Cipher cipher) |
byte[] |
decrypt(Key key,
byte[] iv,
byte[] ciphertext,
byte[] tag,
byte[] aad,
String provider) |
SimpleAeadCipher.CipherOutput |
encrypt(Key key,
byte[] iv,
byte[] plaintext,
byte[] aad,
String provider) |
Cipher |
getInitialisedCipher(Key key,
byte[] iv,
int mode,
String provider) |
boolean |
isAvailable(org.slf4j.Logger log,
int keyByteLength,
int ivByteLength,
String joseAlg) |
public static final String GCM_TRANSFORMATION_NAME
public SimpleAeadCipher(String algorithm, int tagByteLength)
public Cipher getInitialisedCipher(Key key, byte[] iv, int mode, String provider) throws JoseException
JoseException
public SimpleAeadCipher.CipherOutput encrypt(Key key, byte[] iv, byte[] plaintext, byte[] aad, String provider) throws JoseException
JoseException
public byte[] decrypt(Key key, byte[] iv, byte[] ciphertext, byte[] tag, byte[] aad, String provider) throws JoseException
JoseException
public byte[] decrypt(byte[] ciphertext, byte[] tag, byte[] aad, Cipher cipher) throws JoseException
JoseException
public boolean isAvailable(org.slf4j.Logger log, int keyByteLength, int ivByteLength, String joseAlg)
Copyright © 2021. All rights reserved.