Skip to content

Instantly share code, notes, and snippets.

View nabudahab's full-sized avatar
🚀

Natheir Abu-Dahab nabudahab

🚀
  • West Lafayette, Indiana
  • 17:28 (UTC -05:00)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from math import *
#This code will calculate orbital parameters from apogee and perigee altitude and inclination angle
#around earth. It will also calculate the necessary delta-v for certain orbital maneuvers.
#Define Constants
mu = 398600; #km^3/s^2
R = 6378; #km
#The following function returns perigee and apogee radius, eccentricity and semi-major axis from
import java.math.BigInteger;
import java.util.Scanner;
public class rsaEncryption {
public static void main(String[] args){
rsaEncryption r = new rsaEncryption();
Scanner in = new Scanner(System.in);
//Ask the user whether they want to encrypt or decrypt
System.out.print("(e)ncrypt or (d)ecrypt? ");