1 13 14 package org.ejbca.util.passgen; 15 16 21 public class PasswordGeneratorFactory { 22 23 24 public static final int PASSWORDTYPE_DIGITS = 0; 25 public static final int PASSWORDTYPE_LETTERSANDDIGITS = 1; 26 public static final int PASSWORDTYPE_ALLPRINTABLE = 2; 27 28 static final IPasswordGenerator[] classes = { new DigitPasswordGenerator(), 29 new LettersAndDigitsPasswordGenerator(), 30 new AllPrintableCharPasswordGenerator()}; 31 32 33 38 39 public static IPasswordGenerator getInstance(int type){ 40 return classes[type]; 41 } 42 43 } 44 | Popular Tags |