首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

java.security.NoSuchAlgorithmException: Cannot

2011-11-25 
applet与webservice加密通讯的问题??????????我在applet中调用webservice的方法时,传递了字符串参数,字符

applet与webservice加密通讯的问题??????????
我在applet中调用webservice的方法时,传递了字符串参数,字符串通过      
  public   static   DESTools   getInstance(byte   key[])
                throws   NoSuchPaddingException,   NoSuchAlgorithmException
        {
                DESTools   des   =   new   DESTools();
                if(des.key   ==   null)
                {
                        SecretKeySpec   spec   =   new   SecretKeySpec(key,   "DES ");
                        des.key   =   spec;
                }
                des.cipher   =   Cipher.getInstance( "DES/ECB/PKCS5Padding ");
                return   des;
        }
加密,在ide中运行没有问题,因为用了jdk的环境,但是在ie中运行出现
java.security.NoSuchAlgorithmException:   Cannot   find   any   provider   supporting   DES/ECB/PKCS5Padding这个错误,请问应该怎么做??????



[解决办法]
帮楼主顶上去
[解决办法]
lz在classpath设置一下:路径下的Java\jre1.5.0_05\lib\ext\sunjce_provider.jar

对应着你的jdk路径,在jre下的ext下的sunjce_provider.jar

[解决办法]
可能是你的那个类/包没有找到,你在你的WEB程序里面把你的类/包给引进去试试。

热点排行