public class CipherSymmetricFactory
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ALGORITHM_WAS_INVALID |
|
static java.lang.String |
ALGORITHM_WAS_INVALID_INIT_CIPHER |
|
static int |
GCM_IV_LENGTH |
|
static int |
GCM_TAG_LENGTH |
|
static java.lang.String |
KEY_WAS_INVALID_INIT_CIPHER |
|
static java.lang.String |
PADDING_WAS_INVALID |
| Constructor | Description |
|---|---|
CipherSymmetricFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
javax.crypto.Cipher |
forDecrypt(Transformation transformation,
byte[] cek,
byte[] initVector,
byte[] aad) |
|
javax.crypto.Cipher |
forDecrypt(Transformation transformation,
java.security.Key key,
byte[] initVector,
byte[] aad) |
|
javax.crypto.Cipher |
forEncrypt(Transformation transformation,
java.security.Key key,
byte[] aad) |
|
protected javax.crypto.Cipher |
makeCipher(Transformation transformation,
java.security.Key key,
int mode,
java.security.spec.AlgorithmParameterSpec spec,
byte[] aad) |
|
byte[] |
makeInitVector() |
|
protected java.security.spec.AlgorithmParameterSpec |
makeSpec(Transformation transformation,
byte[] initVector) |
public static final int GCM_TAG_LENGTH
public static final int GCM_IV_LENGTH
public static final java.lang.String ALGORITHM_WAS_INVALID
public static final java.lang.String PADDING_WAS_INVALID
public static final java.lang.String KEY_WAS_INVALID_INIT_CIPHER
public static final java.lang.String ALGORITHM_WAS_INVALID_INIT_CIPHER
public javax.crypto.Cipher forEncrypt(Transformation transformation, java.security.Key key, byte[] aad) throws CipherException
CipherExceptionpublic javax.crypto.Cipher forDecrypt(Transformation transformation, java.security.Key key, byte[] initVector, byte[] aad) throws CipherException
CipherExceptionpublic javax.crypto.Cipher forDecrypt(Transformation transformation, byte[] cek, byte[] initVector, byte[] aad) throws CipherException
CipherExceptionpublic byte[] makeInitVector()
protected java.security.spec.AlgorithmParameterSpec makeSpec(Transformation transformation, byte[] initVector)
protected javax.crypto.Cipher makeCipher(Transformation transformation, java.security.Key key, int mode, java.security.spec.AlgorithmParameterSpec spec, byte[] aad) throws CipherException
CipherException