BadPaddingException:垫块损坏的Andr​​oid [英] BadPaddingException: pad block corrupted in Android

查看:389
本文介绍了BadPaddingException:垫块损坏的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解密电子邮件ID,并得到此异常。我的加密是成功的,但同时解密我得到这个。

I am trying to decrypt email id and get this exception. My encryption is successfully but while decryption i get this.

产生的原因:javax.crypto.BadPaddingException:垫块损坏
        在org.bouncycastle.jce.provider.JCEBlockCipher.engineDoFinal(JCEBlockCipher.java:715)
        在javax.crypto.Cipher.doFinal(Cipher.java:1090)

帮助鸭preciated

Help Appreciated

推荐答案

无论是密文已损坏,或不使用相同的块大小或填充解密是用于加密。

Either the ciphertext has become corrupted, or you are not using the same block size or padding to decrypt as was used to encrypt.

您能告诉我们您正在使用加密和解密code?

Can you show us the code you're using to encrypt and decrypt?

这篇关于BadPaddingException:垫块损坏的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆