public class SecuredGCMUsage
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static int |
AES_KEY_SIZE |
|
static java.lang.String |
ALGO_TRANSFORMATION_STRING |
|
static int |
IV_SIZE |
|
static int |
TAG_BIT_LENGTH |
| Constructor | Description |
|---|---|
SecuredGCMUsage() |
| Modifier and Type | Method | Description |
|---|---|---|
static byte[] |
aesDecrypt(byte[] encryptedMessage,
javax.crypto.SecretKey aesKey,
javax.crypto.spec.GCMParameterSpec gcmParamSpec,
byte[] aadData) |
Attempts to decrypt the
encryptedMessage with a symmetric encryption technique |
static byte[] |
aesEncrypt(java.lang.String message,
javax.crypto.SecretKey aesKey,
javax.crypto.spec.GCMParameterSpec gcmParamSpec,
byte[] aadData) |
Attempts to encrypt the
message with a symmetric encryption technique |
public static int AES_KEY_SIZE
public static int IV_SIZE
public static int TAG_BIT_LENGTH
public static java.lang.String ALGO_TRANSFORMATION_STRING
public static byte[] aesEncrypt(java.lang.String message,
javax.crypto.SecretKey aesKey,
javax.crypto.spec.GCMParameterSpec gcmParamSpec,
byte[] aadData)
message with a symmetric encryption techniquemessage - the String of data you wish to encryptaesKey - the symmetrical encryption key to be used for the encryptiongcmParamSpec - the GCM parameter specifications used for the encryptionaadData - the extra data tag to be included within the final encryptionpublic static byte[] aesDecrypt(byte[] encryptedMessage,
javax.crypto.SecretKey aesKey,
javax.crypto.spec.GCMParameterSpec gcmParamSpec,
byte[] aadData)
encryptedMessage with a symmetric encryption techniqueencryptedMessage - the String of data you wish to encryptaesKey - the symmetrical encryption key to be used for the decryptiongcmParamSpec - the GCM parameter specifications used during encryptionaadData - the extra data tag to be included within the encryption