public static final IRandom getInstance(String prng) {
      if (prng == null) {
         return null;
      }

      prng = prng.trim();
      IRandom result = null;
      if (prng.equalsIgnoreCase(ARCFOUR_PRNG)
            || prng.equalsIgnoreCase(RC4_PRNG)) {
         result = new ARCFour();
      } else if (prng.equalsIgnoreCase(ICM_PRNG)) {
         result = new ICMGenerator();
      } else if (prng.equalsIgnoreCase(MD_PRNG)) {
         result = new MDGenerator();
      } else if (prng.equalsIgnoreCase(UMAC_PRNG)) {
         result = new UMacGenerator();
      } else if (prng.toLowerCase().startsWith(PBKDF2_PRNG_PREFIX)) {
         String macName = prng.substring(PBKDF2_PRNG_PREFIX.length());
         IMac mac = MacFactory.getInstance(macName);
         if (mac == null) {
            return null;
         }
         result = new PBKDF2(mac);
      }

      return result;
   }