O'Reilly logo

Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java by David Coffin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing on the Client

Our code in OracleJavaSecure is intended to be run as a client-server application to encrypt data on one end (e.g., server) and decrypt it at the other (e.g., client). However, it is nice to be able to test our code without introducing some of the complexities of client-server communication. So we will test all of our code so far on the client only. On the client we will generate the keys, encrypt data with the private key, build an equivalent public key from the public key artifacts, and decrypt data with the equivalent public key.

Writing the main() Method

In my experience, the best place to put test code is right in the class whose functions you are testing. Obviously you have to run your code in order to test it, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required