|
|
I want to have a 2-way encryptor as a member variable in my servlet. I started out using the BasicTextEncryptor, which implements the interface TextEncryptor, so that's the type of my member variable. Now I want to have more control over the encryptor, so I'm switching to the StandardPBEStringEncryptor that the javadocs mention as being wrapped by the BasicTextEncryptor. I was surprised to see that this implements an identical, but different, interface called StringEncryptor. Thus I have to make my servlet's member variable be of a different type, instead of just swapping in a different implementation of the same interface. There has to be a reason for this interface duplication, but I can't think of what it might be.
|