X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fbouncycastle%2Fcrypto%2FCipherKeyGenerator.java;fp=src%2Forg%2Fbouncycastle%2Fcrypto%2FCipherKeyGenerator.java;h=0000000000000000000000000000000000000000;hb=4daeeb4119b901d53b44913c86f8af3ce67db925;hp=451f8e8f284a7f201d1cd714e845ccd84d45410f;hpb=da1f843588c8bd2b2c7cc74a5b4ffff8d57ab712;p=org.ibex.core.git diff --git a/src/org/bouncycastle/crypto/CipherKeyGenerator.java b/src/org/bouncycastle/crypto/CipherKeyGenerator.java deleted file mode 100644 index 451f8e8..0000000 --- a/src/org/bouncycastle/crypto/CipherKeyGenerator.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.bouncycastle.crypto; - -import java.security.SecureRandom; - -/** - * The base class for symmetric, or secret, cipher key generators. - */ -public class CipherKeyGenerator -{ - protected SecureRandom random; - protected int strength; - - /** - * initialise the key generator. - * - * @param param the parameters to be used for key generation - */ - public void init( - KeyGenerationParameters param) - { - this.random = param.getRandom(); - this.strength = (param.getStrength() + 7) / 8; - } - - /** - * generate a secret key. - * - * @return a byte array containing the key value. - */ - public byte[] generateKey() - { - byte[] key = new byte[strength]; - - random.nextBytes(key); - - return key; - } -}