Download Data Encryption on a Network

Transcript
6.4 Resources used
Libraries of Bouncy Castle[42]:
• bcprov-jdk16-145.jar
Data base: Practica4_LPS.mdb
To install the library on windows:
Control Panel ->administrative tools->data sources(ODBC)->add...->Driver do Microso
6.5 Encryption implementation on the applications
6.5.1 Client application :
When a Hilo class is created, the file containing the public RSA key will be opened
and stored in a variable for further use.
try {
f = new FileInputStream("public.out");
} catch (FileNotFoundException e1) {
e1.printStackTrace();
}
ObjectInputStream o = null;
try {
o = new ObjectInputStream(f);
} catch (IOException e1) {
e1.printStackTrace();
}
try {
_publicKey=(PublicKey)o.readObject();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
try {
o.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
f.close();
} catch (IOException e) {
e.printStackTrace();
}
64