java.security.InvalidKeyException: Incompatible parameters
843811Nov 12 2009 — edited Nov 16 2009I'm getting an exception after just following the tutorial at:
http://www.exampledepot.com/egs/javax.crypto/GenDhParams.html
http://www.exampledepot.com/egs/javax.crypto/KeyAgree.html
http://www.exampledepot.com/egs/javax.crypto/DesString.html
Is there a way to figure out why my parameters are incompatible?
java.lang.RuntimeException: java.security.InvalidKeyException: Incompatible parameters
at jexxus.common.Encryption.createEncryptionAlgorithm(Encryption.java:78)
at jexxus.common.Encryption.createEncryptionAlgorithm(Encryption.java:28)
at jexxus.server.ServerConnection.<init>(ServerConnection.java:43)
at jexxus.server.Server$1.run(Server.java:101)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.InvalidKeyException: Incompatible parameters
at com.sun.crypto.provider.DHKeyAgreement.engineDoPhase(DashoA13*..)
at javax.crypto.KeyAgreement.doPhase(DashoA13*..)
at jexxus.common.Encryption.createEncryptionAlgorithm(Encryption.java:70)
... 4 more
Thanks