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(Key key,
byte[] iv,
byte[] ciphertext,
byte[] tag,
byte[] aad) |
SimpleAeadCipher.CipherOutput |
encrypt(Key key,
byte[] iv,
byte[] plaintext,
byte[] aad) |
boolean |
isAvailable(org.apache.commons.logging.Log log,
int keyByteLength,
int ivByteLength,
String joseAlg) |
public static final String GCM_TRANSFORMATION_NAME
public SimpleAeadCipher(String algorithm, int tagByteLength)
public SimpleAeadCipher.CipherOutput encrypt(Key key, byte[] iv, byte[] plaintext, byte[] aad) throws JoseException
JoseException
public byte[] decrypt(Key key, byte[] iv, byte[] ciphertext, byte[] tag, byte[] aad) throws JoseException
JoseException
public boolean isAvailable(org.apache.commons.logging.Log log, int keyByteLength, int ivByteLength, String joseAlg)
Copyright © 2015. All rights reserved.