Skip to content

Instantly share code, notes, and snippets.

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
/*
A simple example of a blockchain demonstrating how data stored in it cannot be changed.
*/
class Block {
@marnix135
marnix135 / main.py
Created January 2, 2018 12:01
Simple RSA implementation in Python
import random
import math
class RSA:
def __init__(self):
self.e = self.d = self.p = self.q = self.phi = 0
def __egcd(self, a, b):
if a == 0:
return (b, 0, 1)