public static ECDHECryptography fromNamedCurveId(int supportedGroupId){
  SupportedGroup group=SupportedGroup.fromId(supportedGroupId);
  if (group == null) {
    return null;
  }
 else {
    try {
      return new ECDHECryptography(group.name());
    }
 catch (    GeneralSecurityException e) {
      LOGGER.log(Level.WARNING,"Cannot create ephemeral keys for group [{0}]: {1}",new Object[]{group.name(),e.getMessage()});
      return null;
    }
  }
}

public static ECDHECryptography fromNamedCurveId ( int supportedGroupId ) { SupportedGroup group = SupportedGroup . fromId ( supportedGroupId ) ; if ( group == null ) { return null ; } else { try { return new ECDHECryptography ( group . name ( ) ) ; } catch ( GeneralSecurityException e ) { LOGGER . log ( Level . WARNING , "Cannot create ephemeral keys for group [{0}]: {1}" , new Object [ ] { group . name ( ) , e . getMessage ( ) } ) ; return null ; } } }
creates an ephemeral ecdh key pair for a supported group ( named curve ) .
