Testing Our Secure Client/Server Data Transmission

In a Command Prompt, Change directories to Chapter6. Compile the code with this command:

javac orajavsec/OracleJavaSecure.java

Again, if you have any problems, refer to Chapter 3 for directions on compiling at the command prompt and setting your environment CLASSPATH to include ojdbc6.jar. Then run the code from that same directory with this command:

java orajavsec.OracleJavaSecure

The following six lines will be printed as a result:

Monday PBEWithSHA1AndDESede PBEWithMD5AndDES Tuesday Wednesday Thursday

The first two lines show the same client-only tests that we performed earlier in this chapter. After that, because testingOnServer is true, the main() method continues to get the DES secret ...

Get Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.