Testing DES Encryption on the Client Only

Once again, we are going to do our client-side-only testing by calling our methods from the main() method of OracleJavaSecure. The code for the first part of main() is shown in Listing 6-19. Start out by getting our client public key modulus and exponent, which in the process generates the RSA Public/private key pair, if not existing.

Listing 6-19. Code for Client-Only Testing, from main()

    String clientPubModulus = getLocRSAPubMod();     String clientPubExponent = getLocRSAPubExp();     // Emulates server actions     RAW mCryptSessionSecretDESPassPhrase =         getCryptSessionSecretDESPassPhrase( clientPubModulus,         clientPubExponent );     RAW mCryptSessionSecretDESSalt =         getCryptSessionSecretDESSalt( ...

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.