| Modifier and Type | Field and Description |
|---|---|
static TinkFipsUtil.AlgorithmFipsCompatibility |
FIPS |
static int |
IV_SIZE_IN_BYTES |
static int |
TAG_SIZE_IN_BYTES |
| Constructor and Description |
|---|
InsecureNonceAesGcmJce(byte[] key) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] iv,
byte[] ciphertext,
byte[] associatedData)
Decrypts
ciphertext with iv and associatedData. |
byte[] |
decrypt(byte[] iv,
byte[] ciphertextWithPrefix,
int ciphertextOffset,
byte[] associatedData)
Decrypts
ciphertextWithPrefix with iv and associatedData. |
byte[] |
encrypt(byte[] iv,
byte[] plaintext,
byte[] associatedData)
Encrypts
plaintext with iv and associatedData. |
byte[] |
encrypt(byte[] iv,
byte[] plaintext,
int ciphertextOffset,
byte[] associatedData)
Encrypts
plaintext with iv and associatedData. |
public static final TinkFipsUtil.AlgorithmFipsCompatibility FIPS
public static final int IV_SIZE_IN_BYTES
public static final int TAG_SIZE_IN_BYTES
public InsecureNonceAesGcmJce(byte[] key)
throws GeneralSecurityException
GeneralSecurityExceptionpublic byte[] encrypt(byte[] iv,
byte[] plaintext,
byte[] associatedData)
throws GeneralSecurityException
plaintext with iv and associatedData.GeneralSecurityExceptionpublic byte[] encrypt(byte[] iv,
byte[] plaintext,
int ciphertextOffset,
byte[] associatedData)
throws GeneralSecurityException
plaintext with iv and associatedData.
The ciphertextOffset is the offset at which the ciphertext should start in the
returned byte array.
GeneralSecurityExceptionpublic byte[] decrypt(byte[] iv,
byte[] ciphertext,
byte[] associatedData)
throws GeneralSecurityException
ciphertext with iv and associatedData.GeneralSecurityExceptionpublic byte[] decrypt(byte[] iv,
byte[] ciphertextWithPrefix,
int ciphertextOffset,
byte[] associatedData)
throws GeneralSecurityException
ciphertextWithPrefix with iv and associatedData.
The ciphertextOffset is the offset at which the ciphertext starts within ciphertextWithPrefix.
GeneralSecurityException