Skip to content

Instantly share code, notes, and snippets.

@davidhmaciasv
davidhmaciasv / Criptografia.java
Last active May 22, 2017 07:42
recibe una llave publica y genera la llave privada
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;
public class Criptografia {
public static void main(String[] args) throws IOException {
PrintWriter out = new PrintWriter(System.out);
@davidhmaciasv
davidhmaciasv / Commands.java
Last active February 20, 2017 05:06
avance trabajo 1
public class Commands {
public static long gcd(long a, long b) {
long t;
while (b != 0) {
t = b;
b = a % b;
a = t;
}
return a;