Skip to content

Commit

Permalink
feat(Main): initialize instances
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar-schwarz committed May 31, 2024
1 parent c174a46 commit 2ec3aaf
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/main/java/rsa_encryption/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ public class Main
{
public static void main( String[] args )
{
KeyPair keyPair = new KeyPair(356409787, 356409787);
KeyGenerator generatorA = new KeyGenerator(11, 17);
generatorA.generateKeys();

KeyGenerator generatorB = new KeyGenerator(98963, 49927);
generatorB.generateKeys();

ChatParticipant alice = new ChatParticipant("Alice", generatorA.getKeyPair());
ChatParticipant bob = new ChatParticipant("Bob", generatorB.getKeyPair());

ChatParticipant.makePartners(alice, bob);

CryptoFileString gedicht = new CryptoFileString();
gedicht.setFilepath("text/Gedicht.txt");

CryptoFileString hallowelt = new CryptoFileString();
hallowelt.setFilepath("text/hallowelt.txt");

CryptoFileString tragedy = new CryptoFileString();
tragedy.setFilepath("text/tragedy.txt");

bob.sendMessage(hallowelt);
}
}

0 comments on commit 2ec3aaf

Please sign in to comment.