Hi, I'm using JSS for https transaction from my server to another server,
but I'm also using the encryption classes to do some encoding of cookies.
I'm using the following initialization code to get the SymmetricKey I will
need in the Cipher initDecrypt and initEncrypt methods:

           CryptoManager.initialize("secmod.db", "key3.db", "cert7.db");

            cm = CryptoManager.getInstance();
            ct = cm.getInternalCryptoToken();

            kg = ct.getKeyGenerator(KeyGenAlgorithm.DES);
            sk = kg.generate();

However, I have two web servers that the user can bounce between and I need
this key to be the same on both servers so that the cookie can be encrypted
and decrypted properly (we can't use ssl on this page because of some
authentication problems with the package we are using, so we are encrypting
ourselves).  So instead of generating the key on the fly, I need someway to
generate one from a configuration file or even a hard-coded string in my
Class, but I don't see a constructor or method for doing this.

Any ideas?

doug davies



Reply via email to