wt0201

导航

 

Briefly describe an error from your past projects that you have recently completed or an error from other projects which impress you most. State the reason, impact of the error and how did you find it.

在使用Java实现RSA加密算法时,出现了密文经过解密运算后与明文不一致的情况。通过输出每一步计算后的结果,发现是由于数据类型大小范围的不同造成的。在初始化时使用的是BigInteger,但在计算的过程之中,有些地方使用的是Integer。通过将程序中的所有Integer都改为BigInteger并相应地改变运算过程,密文在经过解密运算后与明文一致。

 

posted on 2018-03-11 14:13  wt0201  阅读(125)  评论(0)    收藏  举报