Class AlgNameMapper


  • public class AlgNameMapper
    extends Object
    Provides Algorithm Name to OID and OID to Algorithm Name mappings. Some known mappings are hardcoded. Tries to obtain additional mappings from installed providers during initialization.
    • Method Detail

      • addMapping

        public static void addMapping​(String oid,
                                      String name)
        Adds a mapping to the internal table. Will overwrite any entry already present. Visible for testing.
      • removeMapping

        public static void removeMapping​(String oid,
                                         String name)
        Removes a mapping from the internal table. Visible for testing.
      • map2OID

        public static String map2OID​(String algName)
        Returns OID for algName
        Parameters:
        algName - algorithm name to be mapped
        Returns:
        OID as String
      • map2AlgName

        public static String map2AlgName​(String oid)
        Returns algName for OID
        Parameters:
        oid - OID to be mapped
        Returns:
        algorithm name or null if not found.
      • getStandardName

        public static String getStandardName​(String algName)
        Returns Algorithm name for given algorithm alias
        Parameters:
        algName - - alias
        Returns:
        algorithm name
      • isOID

        public static boolean isOID​(String alias)
        Checks if parameter represents OID
        Parameters:
        alias - alias to be checked
        Returns:
        'true' if parameter represents OID
      • normalize

        public static String normalize​(String oid)
        Removes leading "OID." from oid String passed
        Parameters:
        oid - string that may contain leading "OID."
        Returns:
        string passed without leading "OID."