Code example for SecretKeySpec

0
engine.init(new KeyGenerationParameters(new SecureRandom(), defaultKeySize));
            uninitialised = false;
        } 
 
        return new SecretKeySpec(engine.generateKey(), algName);
    } 
 
    /** 
     * the generators that are defined directly off us. 
     */ 
 
    /** 
     * DES 
     */ 
    public static class DES 
        extends JCEKeyGenerator 
    { 
        public DES() 
        { 
            super("DES", 64, new DESKeyGenerator());