Example #1
0
    static {
      types.setMaximum(0xFFFF);
      types.setNumericAllowed(true);

      types.add(PKIX, "PKIX");
      types.add(SPKI, "SPKI");
      types.add(PGP, "PGP");
      types.add(PKIX, "IPKIX");
      types.add(SPKI, "ISPKI");
      types.add(PGP, "IPGP");
      types.add(PGP, "ACPKIX");
      types.add(PGP, "IACPKIX");
      types.add(URI, "URI");
      types.add(OID, "OID");
    }
Example #2
0
 /**
  * Converts a textual representation of an certificate type into its numeric code. Integers in
  * the range 0..65535 are also accepted.
  *
  * @param s The textual representation of the algorithm
  * @return The algorithm code, or -1 on error.
  */
 public static int value(String s) {
   return types.getValue(s);
 }
Example #3
0
 /** Converts a certificate type into its textual representation */
 public static String string(int type) {
   return types.getText(type);
 }