1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 19:47:58 +01:00

Fix checkstyle

This commit is contained in:
vanitasvitae 2017-07-31 14:57:43 +02:00
parent 422660e9fe
commit 45563b75fe
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -25,7 +25,7 @@ import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public abstract class AesGcmNoPadding {
@ -56,8 +56,8 @@ public abstract class AesGcmNoPadding {
cipher = Cipher.getInstance(cipherMode, "BC");
SecretKey keySpec = new SecretKeySpec(key, keyType);
GCMParameterSpec gcmSpec = new GCMParameterSpec(128, iv);
cipher.init(Cipher.ENCRYPT_MODE, keySpec, gcmSpec);
IvParameterSpec ivSpec = new IvParameterSpec(iv);
cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);
}
public AesGcmNoPadding(byte[] key, byte[] iv) throws NoSuchPaddingException, NoSuchAlgorithmException,
@ -72,8 +72,8 @@ public abstract class AesGcmNoPadding {
cipher = Cipher.getInstance(cipherMode, "BC");
SecretKeySpec keySpec = new SecretKeySpec(key, keyType);
GCMParameterSpec gcmSpec = new GCMParameterSpec(128, iv);
cipher.init(Cipher.DECRYPT_MODE, keySpec, gcmSpec);
IvParameterSpec ivSpec = new IvParameterSpec(iv);
cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);
}
public byte[] getKeyAndIv() {