【发布时间】:2015-05-24 05:43:58
【问题描述】:
我尝试使用以下代码加密明文。该代码似乎加密了文本,但它没有解密回明文。我做错了什么?
代码:
Entity entity = new Entity("password");
byte[] ciphertext = crypto.encrypt(("data to encrypt").getBytes(),entity);
plaintext = crypto.decrypt(ciphertext,entity)
输出:
Ecrypted text:[B@417a110
Decrypted text:[B@417df20
【问题讨论】:
-
我现在也有同样的问题,有人知道为什么我们看不到实际的文字吗?