RSA Encryption Example

Discussion created by rlwatson on Nov 4, 2012
Latest reply on Nov 5, 2012 by rlwatson
The ArcGIS Server admin API provides the ability to encrypt credentials when requesting a token over HTTP.

The documentation states that it uses RSA and that you can get the public key and modulus from the admin API.

So the idea is to get the public key and modulus, encrypt the credentials, add the encrypted=true argument, and then request a token over HTTP.

My question is whether or not anyone has a example?  I am looking for a .NET encryption function which takes the public key, modulus, and a string to encrypt and returns the encyrpted string that ArcGIS Server can consume.