I haver a Cipher object returned by CryptoToken's
getCipherContext(EncryptionAlgorithm.DES3_CBC)
But when I go to encrypt with initEncrypt(symKey) I get the following error:

"java.security.InvalidAlgorithmParameterException: DES3/CBC requires an
algorithm parameter
        at
org.mozilla.jss.pkcs11.PK11Cipher.checkParams(PK11Cipher.java:223)
        at
org.mozilla.jss.pkcs11.PK11Cipher.initEncrypt(PK11Cipher.java:100)
        at
org.mozilla.jss.pkcs11.PK11Cipher.initEncrypt(PK11Cipher.java:83)"

What AlgorithmParameterSpec am I suppposed to pass in? I would have thought
that getCipherContext(EncryptionAlgorithm.DES3_CBC) would be enough for
specifying the encryption algorithm...

-- P



Reply via email to