Java 类org.bouncycastle.crypto.params.CramerShoupKeyGenerationParameters 实例源码

项目:gwt-crypto    文件:CramerShoupTest.java   
private CramerShoupCiphertext encrypt(BigInteger message, String label)
{
    CramerShoupKeyPairGenerator kpGen = new CramerShoupKeyPairGenerator();
    CramerShoupParametersGenerator pGen = new CramerShoupParametersGenerator();

    pGen.init(2048, 1, RND);
    CramerShoupParameters params = pGen.generateParameters(DHStandardGroups.rfc3526_2048);
    CramerShoupKeyGenerationParameters param = new CramerShoupKeyGenerationParameters(RND, params);

    kpGen.init(param);
    keyPair = kpGen.generateKeyPair();

    CramerShoupCoreEngine engine = new CramerShoupCoreEngine();
    if (label != null)
    {
        engine.init(true, keyPair.getPublic(), label);
    }
    else
    {
        engine.init(true, keyPair.getPublic());
    }

    CramerShoupCiphertext ciphertext = engine.encryptBlock(message);

    return ciphertext;
}
项目:gwt-crypto    文件:CramerShoupKeyPairGenerator.java   
public void init(KeyGenerationParameters param) {
    this.param = (CramerShoupKeyGenerationParameters) param;
}
项目:Aki-SSL    文件:CramerShoupKeyPairGenerator.java   
public void init(KeyGenerationParameters param) {
    this.param = (CramerShoupKeyGenerationParameters) param;
}
项目:TinyTravelTracker    文件:CramerShoupKeyPairGenerator.java   
public void init(KeyGenerationParameters param) {
    this.param = (CramerShoupKeyGenerationParameters) param;
}