I generated a .pem file that contains Diffie-Hellman parameters. I used this command line:
openssl dhparam -outform PEM 2048 -out dhparam.pem
The file looks like this:
-----BEGIN DH PARAMETERS-----
MIIBCAKCAQEA6gS7LGwOkRMfJJX2sBK NRwSL1OaegjVeEh FJJbWRLG7pB9W7JX
[4 lines omitted]
7LyTYZEvaaAK27xuf4uo4YCFnaOkxp/R6wIBAg==
-----END DH PARAMETERS-----
How can I extract the Generator and Prime values from this file using .Net Framework code?