diff options
3 files changed, 28 insertions, 40 deletions
diff --git a/src/main/java/org/bouncycastle/jcajce/provider/digest/SHA3.java b/src/main/java/org/bouncycastle/jcajce/provider/digest/SHA3.java index b125e512..2c832fbd 100644 --- a/src/main/java/org/bouncycastle/jcajce/provider/digest/SHA3.java +++ b/src/main/java/org/bouncycastle/jcajce/provider/digest/SHA3.java @@ -32,43 +32,43 @@ public class SHA3 return d; } } - + static public class Digest224 extends DigestSHA3 + { + public Digest224() { - public Digest224() - { - super(224); - } + super(224); } + } static public class Digest256 - extends DigestSHA3 + extends DigestSHA3 { public Digest256() { super(256); } } - + static public class Digest384 - extends DigestSHA3 + extends DigestSHA3 { public Digest384() { super(384); } } - + static public class Digest512 - extends DigestSHA3 + extends DigestSHA3 { public Digest512() { super(512); } } - + /** * SHA3 HMac */ @@ -80,19 +80,21 @@ public class SHA3 super(new HMac(new SHA3Digest(224))); } } - + public static class HashMac256 extends BaseMac { - public HashMac256() { + public HashMac256() + { super(new HMac(new SHA3Digest(256))); } } - + public static class HashMac384 - extends BaseMac + extends BaseMac { - public HashMac384() { + public HashMac384() + { super(new HMac(new SHA3Digest(384))); } } @@ -100,7 +102,8 @@ public class SHA3 public static class HashMac512 extends BaseMac { - public HashMac512() { + public HashMac512() + { super(new HMac(new SHA3Digest(512))); } } @@ -117,7 +120,8 @@ public class SHA3 public static class KeyGenerator256 extends BaseKeyGenerator { - public KeyGenerator256() { + public KeyGenerator256() + { super("HMACSHA3-256", 256, new CipherKeyGenerator()); } } @@ -125,19 +129,21 @@ public class SHA3 public static class KeyGenerator384 extends BaseKeyGenerator { - public KeyGenerator384() { + public KeyGenerator384() + { super("HMACSHA3-384", 384, new CipherKeyGenerator()); } } - + public static class KeyGenerator512 extends BaseKeyGenerator { - public KeyGenerator512() { + public KeyGenerator512() + { super("HMACSHA3-512", 512, new CipherKeyGenerator()); } } - + public static class Mappings extends DigestAlgorithmProvider { diff --git a/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseAlgorithmParameters.java b/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseAlgorithmParameters.java index 77a4781d..ec723db6 100644 --- a/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseAlgorithmParameters.java +++ b/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseAlgorithmParameters.java @@ -1,21 +1,9 @@ package org.bouncycastle.jcajce.provider.symmetric.util; -import java.io.IOException; import java.security.AlgorithmParametersSpi; import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidParameterSpecException; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.PBEParameterSpec; -import javax.crypto.spec.RC2ParameterSpec; - -import org.bouncycastle.asn1.ASN1Encoding; -import org.bouncycastle.asn1.ASN1Primitive; -import org.bouncycastle.asn1.pkcs.PBKDF2Params; -import org.bouncycastle.asn1.pkcs.PKCS12PBEParams; -import org.bouncycastle.asn1.pkcs.RC2CBCParameter; -import org.bouncycastle.util.Arrays; - public abstract class BaseAlgorithmParameters extends AlgorithmParametersSpi { diff --git a/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseSecretKeyFactory.java b/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseSecretKeyFactory.java index 2e36fefc..31896cd2 100644 --- a/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseSecretKeyFactory.java +++ b/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/BaseSecretKeyFactory.java @@ -7,15 +7,9 @@ import java.security.spec.KeySpec; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactorySpi; -import javax.crypto.spec.DESKeySpec; -import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; import org.bouncycastle.asn1.ASN1ObjectIdentifier; -import org.bouncycastle.crypto.CipherParameters; -import org.bouncycastle.crypto.params.DESParameters; -import org.bouncycastle.crypto.params.KeyParameter; -import org.bouncycastle.crypto.params.ParametersWithIV; public class BaseSecretKeyFactory extends SecretKeyFactorySpi |