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

      name = name.trim();
      IKeyAgreementParty result = null;
      if (name.equalsIgnoreCase(Registry.DH_KA)) {
         result = new DiffieHellmanReceiver();
      } else if (name.equalsIgnoreCase(Registry.ELGAMAL_KA)) {
         result = new ElGamalReceiver();
      } else if (name.equalsIgnoreCase(Registry.SRP6_KA)) {
         result = new SRP6Host();
      } else if (name.equalsIgnoreCase(Registry.SRP_SASL_KA)) {
         result = new SRP6SaslServer();
      } else if (name.equalsIgnoreCase(Registry.SRP_TLS_KA)) {
         result = new SRP6TLSServer();
      }

      return result;
   }