434445464748495051
protected void engineInit( SecureRandom random) { if (random != null) { engine.init(new KeyGenerationParameters(random, defaultKeySize)); uninitialised = false; } }
5859606162636465666768
{ if (random == null) { random = new SecureRandom(); } engine.init(new KeyGenerationParameters(random, keySize)); uninitialised = false; } catch (IllegalArgumentException e) { throw new InvalidParameterException(e.getMessage());
7172737475767778798081
protected SecretKey engineGenerateKey() { if (uninitialised) { engine.init(new KeyGenerationParameters(new SecureRandom(), defaultKeySize)); uninitialised = false; } return new SecretKeySpec(engine.generateKey(), algName); }
178179180181182183184185186187188
{ System.err.println("Hmmm, no SHA1PRNG, you need the "+ "Sun implementation"); System.exit(1); } KeyGenerationParameters kgp = new KeyGenerationParameters( sr, DESedeParameters.DES_EDE_KEY_LENGTH*8); /* * Second, initialise the key generator with the parameters
156157158159160161162163164165166
protected SecretKey engineGenerateKey() { if (uninitialised) { engine.init(new KeyGenerationParameters(new SecureRandom(), defaultKeySize)); uninitialised = false; } // // if no key size has been defined generate a 24 byte key in
215216217218219220221222223224225
383384385386387388389390391392393
* used */ public void initialize(int keySize, SecureRandom secureRandom) { KeyGenerationParameters kgp; if (keySize <= 10) { // create 2^10 keys int[] defh = {10}; int[] defw = {3}; int[] defk = {2};
457458459460461462463464465
{ int[] defh = {10, 10, 10, 10}; int[] defw = {3, 3, 3, 3}; int[] defk = {2, 2, 2, 2}; KeyGenerationParameters kgp = new GMSSKeyGenerationParameters(new SecureRandom(), new GMSSParameters(defh.length, defh, defw, defk)); this.initialize(kgp); }
444546474849505152
5556575859606162636465
int keySize, SecureRandom random) { try { engine.init(new KeyGenerationParameters(random, keySize)); uninitialised = false; } catch (IllegalArgumentException e) { throw new InvalidParameterException(e.getMessage());