mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 20:42:06 +01:00
Fix checkstyle
This commit is contained in:
parent
422660e9fe
commit
45563b75fe
1 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ import javax.crypto.Cipher;
|
||||||
import javax.crypto.KeyGenerator;
|
import javax.crypto.KeyGenerator;
|
||||||
import javax.crypto.NoSuchPaddingException;
|
import javax.crypto.NoSuchPaddingException;
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
import javax.crypto.spec.GCMParameterSpec;
|
import javax.crypto.spec.IvParameterSpec;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
public abstract class AesGcmNoPadding {
|
public abstract class AesGcmNoPadding {
|
||||||
|
@ -56,8 +56,8 @@ public abstract class AesGcmNoPadding {
|
||||||
|
|
||||||
cipher = Cipher.getInstance(cipherMode, "BC");
|
cipher = Cipher.getInstance(cipherMode, "BC");
|
||||||
SecretKey keySpec = new SecretKeySpec(key, keyType);
|
SecretKey keySpec = new SecretKeySpec(key, keyType);
|
||||||
GCMParameterSpec gcmSpec = new GCMParameterSpec(128, iv);
|
IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||||
cipher.init(Cipher.ENCRYPT_MODE, keySpec, gcmSpec);
|
cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AesGcmNoPadding(byte[] key, byte[] iv) throws NoSuchPaddingException, NoSuchAlgorithmException,
|
public AesGcmNoPadding(byte[] key, byte[] iv) throws NoSuchPaddingException, NoSuchAlgorithmException,
|
||||||
|
@ -72,8 +72,8 @@ public abstract class AesGcmNoPadding {
|
||||||
|
|
||||||
cipher = Cipher.getInstance(cipherMode, "BC");
|
cipher = Cipher.getInstance(cipherMode, "BC");
|
||||||
SecretKeySpec keySpec = new SecretKeySpec(key, keyType);
|
SecretKeySpec keySpec = new SecretKeySpec(key, keyType);
|
||||||
GCMParameterSpec gcmSpec = new GCMParameterSpec(128, iv);
|
IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||||
cipher.init(Cipher.DECRYPT_MODE, keySpec, gcmSpec);
|
cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getKeyAndIv() {
|
public byte[] getKeyAndIv() {
|
||||||
|
|
Loading…
Reference in a new issue