Create Authenticated Session with Access to Persistent Key Cache
To create an authenticated session that can use the persistent key cache, the getSession()
call must include either the cache passphrase or an object that implements NAEKeyCachePassphrase
interface.
Access persistent cache using passphrase
The passphrase is a char array set by the client application when the CADP for Java Provider creates the persistent key cache. The passphrase is obfuscated and stored as part of the NAESession
object. Whenever a key is stored in or retrieved from the key cache, the CADP for Java Provider validates the session’s passphrase. If the passphrase is invalid, the key cache can't be accessed. The passphrase can either be a combination of username and password or a client certificate.
Access persistent cache with username and password
Access persistent cache with client certificate
Access persistent cache with NAEKeyCachePassphrase interface
The NAEKeyCachePassphrase
interface allows you to create your own class that includes the passphrase character array. For example, to use password of length greater than 16, create a class that implements the NAEKeyCachePassphrase
interface.
There are two methods available for getSession
when using NAEKeyCachePassphrase:
Method 1:
Method 2: