/* get plaintext using biginteger class. This is required because default int cannot handle large modpow function */
public byte[] getMyPlainText(int [] a, int d, int n)
{
int l = a.Length;
byte [] r = new byte[l];
for (int i = 0; i < a.Length; i++)
{
int temp = a[i];
/* if temp=199 which represents blankspace, handle it differently */
if (temp == 199 || temp == 200 || temp == 201)
{
r[i] = (byte)temp;
continue;
}
Mono.Math.BigInteger bi = temp;
bi = bi.ModPow(d, n);
string tempString = bi.ToString();
int g = Int32.Parse(tempString);
r[i] = (byte)g;
}
return(r);
}