I want to get the values, for example, 79 201 304 and store in a vector each number in a position.
Example:
int array[0] = 79;
int array[1] = 201;
int array[2] = 304;
public static int Descriptografa(string txt, int p, int q, int d, int e)
{
string[] aux;
int[] descrypt ;
int phi, n, res = 0,i;
string resultado;
n = p * q;
phi = (p - 1) * (q - 1);
d = ((phi * 2) + 1) / e; // d*e ≡ 1 mod (φ n)
for (i = 0; i < txt.Length; i++)
{
aux = txt.Split(' ');
descrypt[] = Array.ConvertAll(aux, str => int.Parse(str));
BigInteger big = BigInteger.Pow(descrypt[i], d) % n;
res = (int)big;
resultado = char.ConvertFromUtf32(res);
Console.Write(resultado);
}
return 0;
}
I am doing a job for RSA encryption college and it is giving problem in the part of decrypt I need to get what the user type that will be numbers separated by spaces and store in vector with to decrypt each number.