Java 类org.bouncycastle.crypto.generators.DESKeyGenerator 实例源码

项目:gwt-crypto    文件:DESTest.java   
public void performTest()
{
    DESKeyGenerator keyGen = new DESKeyGenerator();

    keyGen.init(new KeyGenerationParameters(new SecureRandom(), 56));

    byte[] kB = keyGen.generateKey();

    if (kB.length != 8)
    {
        fail("DES bit key wrong length.");
    }
}
项目:gocd    文件:CipherProvider.java   
private byte[] generateKey() {
    SecureRandom random = new SecureRandom();
    random.setSeed(UUID.randomUUID().toString().getBytes());
    KeyGenerationParameters generationParameters = new KeyGenerationParameters(random, DESParameters.DES_KEY_LENGTH * 8);
    DESKeyGenerator generator = new DESKeyGenerator();
    generator.init(generationParameters);
    return Hex.encode(generator.generateKey());
}
项目:irma_future_id    文件:DESTest.java   
public void performTest()
{
    DESKeyGenerator keyGen = new DESKeyGenerator();

    keyGen.init(new KeyGenerationParameters(new SecureRandom(), 56));

    byte[] kB = keyGen.generateKey();

    if (kB.length != 8)
    {
        fail("DES bit key wrong length.");
    }
}
项目:bc-java    文件:DESTest.java   
public void performTest()
{
    DESKeyGenerator keyGen = new DESKeyGenerator();

    keyGen.init(new KeyGenerationParameters(new SecureRandom(), 56));

    byte[] kB = keyGen.generateKey();

    if (kB.length != 8)
    {
        fail("DES bit key wrong length.");
    }
}
项目:ipack    文件:DES.java   
public KeyGenerator()
{
    super("DES", 64, new DESKeyGenerator());
}
项目:Aki-SSL    文件:DES.java   
public KeyGenerator()
{
    super("DES", 64, new DESKeyGenerator());
}
项目:CryptMeme    文件:DES.java   
public KeyGenerator()
{
    super("DES", 64, new DESKeyGenerator());
}
项目:irma_future_id    文件:DES.java   
public KeyGenerator()
{
    super("DES", 64, new DESKeyGenerator());
}
项目:bc-java    文件:DES.java   
public KeyGenerator()
{
    super("DES", 64, new DESKeyGenerator());
}