diff options
Diffstat (limited to 'libjava/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java')
-rw-r--r-- | libjava/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/libjava/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java b/libjava/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java index 33de6895613..1322e5e8a1a 100644 --- a/libjava/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java +++ b/libjava/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java @@ -50,23 +50,17 @@ import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidParameterSpecException; /** - * The implementation of the AES <i>Service Provider Interface</i> - * (<b>SPI</b>) adapter. + * The implementation of the AES <i>Service Provider Interface</i> (<b>SPI</b>) + * adapter. */ -public final class AESSpi extends CipherAdapter +public final class AESSpi + extends CipherAdapter { - - // Constructors. - // ----------------------------------------------------------------------- - public AESSpi() { super(Registry.AES_CIPHER, 16); } - // Methods from CipherAdapter - // ----------------------------------------------------------------------- - protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException @@ -74,10 +68,8 @@ public final class AESSpi extends CipherAdapter if (params instanceof BlockCipherParameterSpec) { if (((BlockCipherParameterSpec) params).getBlockSize() != 16) - { - throw new InvalidAlgorithmParameterException( - "AES block size must be 16 bytes"); - } + throw new InvalidAlgorithmParameterException( + "AES block size must be 16 bytes"); } super.engineInit(opmode, key, params, random); } @@ -90,9 +82,7 @@ public final class AESSpi extends CipherAdapter try { if (params != null) - { - spec = params.getParameterSpec(BlockCipherParameterSpec.class); - } + spec = params.getParameterSpec(BlockCipherParameterSpec.class); } catch (InvalidParameterSpecException ipse) { |