Advertisement
Krefeld187

Untitled

Mar 5th, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1.  
  2. static BigInteger Verschlüsselung(int e, int n, int text)
  3. {
  4. String wert = String.valueOf(text);
  5. String wertN = String.valueOf(n);
  6. BigInteger temp = new BigInteger(wert);
  7. BigInteger TempN = new BigInteger(wertN);
  8. temp = temp.pow(e);
  9. temp = temp.mod(TempN);
  10. return temp;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement