// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Globalization;
+using System.Runtime.InteropServices;
using System.Text;
using Mono.Xml;
namespace System.Security.Cryptography {
+#if NET_2_0
+ [ComVisible (true)]
+#endif
public abstract class DSA : AsymmetricAlgorithm {
#if NET_2_0
sb.Append (Convert.ToBase64String (dsaParams.Y));
sb.Append( "</Y>");
- sb.Append ("<J>");
- sb.Append (Convert.ToBase64String (dsaParams.J));
- sb.Append ("</J>");
+ if (dsaParams.J != null) {
+ // if J wasn't imported then it's not exported and neither
+ // is part of the XML output
+ sb.Append ("<J>");
+ sb.Append (Convert.ToBase64String (dsaParams.J));
+ sb.Append ("</J>");
+ }
if (dsaParams.Seed != null) {
sb.Append ("<Seed>");