public static IKeyAgreementParty getPartyAInstance(String name) {
      if (name == null) {
         return null;
      }

      name = name.trim();
      IKeyAgreementParty result = null;
      if (name.equalsIgnoreCase(Registry.DH_KA)) {
         result = new DiffieHellmanSender();
      } else if (name.equalsIgnoreCase(Registry.ELGAMAL_KA)) {
         result = new ElGamalSender();
      } else if (name.equalsIgnoreCase(Registry.SRP6_KA)) {
         result = new SRP6User();
      } else if (name.equalsIgnoreCase(Registry.SRP_SASL_KA)) {
         result = new SRP6SaslClient();
      } else if (name.equalsIgnoreCase(Registry.SRP_TLS_KA)) {
         result = new SRP6TLSClient();
      }

      return result;
   }