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

项目:oneops    文件:CmsCryptoDES.java   
/**
 * Generate des key.
 *
 * @param file the file
 * @throws java.io.IOException Signals that an I/O exception has occurred.
 */
public static void generateDESKey(String file) throws IOException {
    DESedeKeyGenerator kg = new DESedeKeyGenerator();
    KeyGenerationParameters kgp = new KeyGenerationParameters(
            new SecureRandom(),
            DESedeParameters.DES_EDE_KEY_LENGTH * 8);
    kg.init(kgp);
    byte[] key = kg.generateKey();
    BufferedOutputStream keystream =
            new BufferedOutputStream(new FileOutputStream(file));
    byte[] keyhex = Hex.encode(key);
    keystream.write(keyhex, 0, keyhex.length);
    keystream.flush();
    keystream.close();
}
项目:libraries    文件:KeyGenerator.java   
public static KeyGenerator create() {
  final SecureRandom random = new SecureRandom();
  final KeyGenerationParameters parameters = new KeyGenerationParameters(
      random,
      DESedeParameters.DES_EDE_KEY_LENGTH * 8);
  final DESedeKeyGenerator keyGenerator = new DESedeKeyGenerator();
  keyGenerator.init(parameters);
  return new KeyGenerator(keyGenerator);
}
项目:ipack    文件:DESede.java   
public KeyGenerator()
{
    super("DESede", 192, new DESedeKeyGenerator());
}
项目:ipack    文件:DESede.java   
public KeyGenerator3()
{
    super("DESede3", 192, new DESedeKeyGenerator());
}
项目:libraries    文件:KeyGenerator.java   
private KeyGenerator(final DESedeKeyGenerator keyGenerator) {
  this.keyGenerator = keyGenerator;
}
项目:Aki-SSL    文件:DESede.java   
public KeyGenerator()
{
    super("DESede", 192, new DESedeKeyGenerator());
}
项目:Aki-SSL    文件:DESede.java   
public KeyGenerator3()
{
    super("DESede3", 192, new DESedeKeyGenerator());
}
项目:CryptMeme    文件:DESede.java   
public KeyGenerator()
{
    super("DESede", 192, new DESedeKeyGenerator());
}
项目:CryptMeme    文件:DESede.java   
public KeyGenerator3()
{
    super("DESede3", 192, new DESedeKeyGenerator());
}
项目:irma_future_id    文件:DESede.java   
public KeyGenerator()
{
    super("DESede", 192, new DESedeKeyGenerator());
}
项目:irma_future_id    文件:DESede.java   
public KeyGenerator3()
{
    super("DESede3", 192, new DESedeKeyGenerator());
}
项目:bc-java    文件:DESede.java   
public KeyGenerator()
{
    super("DESede", 192, new DESedeKeyGenerator());
}
项目:bc-java    文件:DESede.java   
public KeyGenerator3()
{
    super("DESede3", 192, new DESedeKeyGenerator());
}