Java 类org.bouncycastle.crypto.CipherKeyGenerator 实例源码

项目:gwt-crypto    文件:BcCMSContentEncryptorBuilder.java   
CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random)
    throws CMSException
{
    if (random == null)
    {
        random = new SecureRandom();
    }

    CipherKeyGenerator keyGen = helper.createKeyGenerator(encryptionOID, random);

    encKey = new KeyParameter(keyGen.generateKey());

    algorithmIdentifier = helper.generateAlgorithmIdentifier(encryptionOID, encKey, random);

    cipher = helper.createContentCipher(true, encKey, algorithmIdentifier);
}
项目:Aki-SSL    文件:BcCMSContentEncryptorBuilder.java   
CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random)
    throws CMSException
{
    if (random == null)
    {
        random = new SecureRandom();
    }

    CipherKeyGenerator keyGen = helper.createKeyGenerator(encryptionOID, random);

    encKey = new KeyParameter(keyGen.generateKey());

    algorithmIdentifier = helper.generateAlgorithmIdentifier(encryptionOID, encKey, random);

    cipher = helper.createContentCipher(true, encKey, algorithmIdentifier);
}
项目:irma_future_id    文件:BcCMSContentEncryptorBuilder.java   
CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random)
    throws CMSException
{
    if (random == null)
    {
        random = new SecureRandom();
    }

    CipherKeyGenerator keyGen = helper.createKeyGenerator(encryptionOID, random);

    encKey = new KeyParameter(keyGen.generateKey());

    algorithmIdentifier = helper.generateAlgorithmIdentifier(encryptionOID, encKey, random);

    cipher = helper.createContentCipher(true, encKey, algorithmIdentifier);
}
项目:bc-java    文件:BcCMSContentEncryptorBuilder.java   
CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, SecureRandom random)
    throws CMSException
{
    if (random == null)
    {
        random = new SecureRandom();
    }

    CipherKeyGenerator keyGen = helper.createKeyGenerator(encryptionOID, random);

    encKey = new KeyParameter(keyGen.generateKey());

    algorithmIdentifier = helper.generateAlgorithmIdentifier(encryptionOID, encKey, random);

    cipher = helper.createContentCipher(true, encKey, algorithmIdentifier);
}
项目:ipack    文件:BaseKeyGenerator.java   
protected BaseKeyGenerator(
    String algName,
    int defaultKeySize,
    CipherKeyGenerator engine)
{
    this.algName = algName;
    this.keySize = this.defaultKeySize = defaultKeySize;
    this.engine = engine;
}
项目:ipack    文件:EnvelopedDataHelper.java   
private CipherKeyGenerator createCipherKeyGenerator(SecureRandom random, int keySize)
{
    CipherKeyGenerator keyGen = new CipherKeyGenerator();

    keyGen.init(new KeyGenerationParameters(random, keySize));

    return keyGen;
}
项目:gwt-crypto    文件:EnvelopedDataHelper.java   
private CipherKeyGenerator createCipherKeyGenerator(SecureRandom random, int keySize)
{
    CipherKeyGenerator keyGen = new CipherKeyGenerator();

    keyGen.init(new KeyGenerationParameters(random, keySize));

    return keyGen;
}
项目:Aki-SSL    文件:BaseKeyGenerator.java   
protected BaseKeyGenerator(
    String algName,
    int defaultKeySize,
    CipherKeyGenerator engine)
{
    this.algName = algName;
    this.keySize = this.defaultKeySize = defaultKeySize;
    this.engine = engine;
}
项目:Aki-SSL    文件:EnvelopedDataHelper.java   
private CipherKeyGenerator createCipherKeyGenerator(SecureRandom random, int keySize)
{
    CipherKeyGenerator keyGen = new CipherKeyGenerator();

    keyGen.init(new KeyGenerationParameters(random, keySize));

    return keyGen;
}
项目:CryptMeme    文件:BaseKeyGenerator.java   
protected BaseKeyGenerator(
    String algName,
    int defaultKeySize,
    CipherKeyGenerator engine)
{
    this.algName = algName;
    this.keySize = this.defaultKeySize = defaultKeySize;
    this.engine = engine;
}
项目:RuneCraftery    文件:CryptManager.java   
@SideOnly(Side.CLIENT)

    /**
     * Generate a new shared secret AES key from a secure random source
     */
    public static SecretKey createNewSharedKey()
    {
        CipherKeyGenerator cipherkeygenerator = new CipherKeyGenerator();
        cipherkeygenerator.init(new KeyGenerationParameters(new SecureRandom(), 128));
        return new SecretKeySpec(cipherkeygenerator.generateKey(), "AES");
    }
项目:BetterNutritionMod    文件:CryptManager.java   
@SideOnly(Side.CLIENT)

    /**
     * Generate a new shared secret AES key from a secure random source
     */
    public static SecretKey createNewSharedKey()
    {
        CipherKeyGenerator cipherkeygenerator = new CipherKeyGenerator();
        cipherkeygenerator.init(new KeyGenerationParameters(new SecureRandom(), 128));
        return new SecretKeySpec(cipherkeygenerator.generateKey(), "AES");
    }
项目:irma_future_id    文件:EnvelopedDataHelper.java   
private CipherKeyGenerator createCipherKeyGenerator(SecureRandom random, int keySize)
{
    CipherKeyGenerator keyGen = new CipherKeyGenerator();

    keyGen.init(new KeyGenerationParameters(random, keySize));

    return keyGen;
}
项目:bc-java    文件:BaseKeyGenerator.java   
protected BaseKeyGenerator(
    String algName,
    int defaultKeySize,
    CipherKeyGenerator engine)
{
    this.algName = algName;
    this.keySize = this.defaultKeySize = defaultKeySize;
    this.engine = engine;
}
项目:irma_future_id    文件:BaseKeyGenerator.java   
protected BaseKeyGenerator(
    String algName,
    int defaultKeySize,
    CipherKeyGenerator engine)
{
    this.algName = algName;
    this.keySize = this.defaultKeySize = defaultKeySize;
    this.engine = engine;
}
项目:bc-java    文件:EnvelopedDataHelper.java   
private CipherKeyGenerator createCipherKeyGenerator(SecureRandom random, int keySize)
{
    CipherKeyGenerator keyGen = new CipherKeyGenerator();

    keyGen.init(new KeyGenerationParameters(random, keySize));

    return keyGen;
}
项目:ipack    文件:RC6.java   
public KeyGen()
{
    super("RC6", 256, new CipherKeyGenerator());
}
项目:ipack    文件:XTEA.java   
public KeyGen()
{
    super("XTEA", 128, new CipherKeyGenerator());
}
项目:ipack    文件:Grain128.java   
public KeyGen()
{
    super("Grain128", 128, new CipherKeyGenerator());
}
项目:ipack    文件:SEED.java   
public KeyGen()
{
    super("SEED", 128, new CipherKeyGenerator());
}
项目:ipack    文件:VMPC.java   
public KeyGen()
{
    super("VMPC", 128, new CipherKeyGenerator());
}
项目:ipack    文件:Skipjack.java   
public KeyGen()
{
    super("Skipjack", 80, new CipherKeyGenerator());
}
项目:ipack    文件:GOST28147.java   
public KeyGen(int keySize)
{
    super("GOST28147", keySize, new CipherKeyGenerator());
}
项目:ipack    文件:Twofish.java   
public KeyGen()
{
    super("Twofish", 256, new CipherKeyGenerator());
}
项目:ipack    文件:HC256.java   
public KeyGen()
{
    super("HC256", 256, new CipherKeyGenerator());
}
项目:ipack    文件:ARC4.java   
public KeyGen()
{
    super("RC4", 128, new CipherKeyGenerator());
}
项目:ipack    文件:TEA.java   
public KeyGen()
{
    super("TEA", 128, new CipherKeyGenerator());
}
项目:ipack    文件:Noekeon.java   
public KeyGen()
{
    super("Noekeon", 128, new CipherKeyGenerator());
}
项目:ipack    文件:CAST5.java   
public KeyGen()
{
    super("CAST5", 128, new CipherKeyGenerator());
}
项目:ipack    文件:Rijndael.java   
public KeyGen()
{
    super("Rijndael", 192, new CipherKeyGenerator());
}
项目:ipack    文件:Grainv1.java   
public KeyGen()
{
    super("Grainv1", 80, new CipherKeyGenerator());
}
项目:ipack    文件:Salsa20.java   
public KeyGen()
{
    super("Salsa20", 128, new CipherKeyGenerator());
}
项目:ipack    文件:VMPCKSA3.java   
public KeyGen()
{
    super("VMPC-KSA3", 128, new CipherKeyGenerator());
}
项目:ipack    文件:RC2.java   
public KeyGenerator()
{
    super("RC2", 128, new CipherKeyGenerator());
}
项目:ipack    文件:HC128.java   
public KeyGen()
{
    super("HC128", 128, new CipherKeyGenerator());
}
项目:ipack    文件:RC5.java   
public KeyGen32()
{
    super("RC5", 128, new CipherKeyGenerator());
}
项目:ipack    文件:RC5.java   
public KeyGen64()
{
    super("RC5-64", 256, new CipherKeyGenerator());
}
项目:ipack    文件:Camellia.java   
public KeyGen(int keySize)
{
    super("Camellia", keySize, new CipherKeyGenerator());
}
项目:ipack    文件:IDEA.java   
public KeyGen()
{
    super("IDEA", 128, new CipherKeyGenerator());
}
项目:ipack    文件:Blowfish.java   
public KeyGen()
{
    super("Blowfish", 128, new CipherKeyGenerator());
}