我有2个BLOB对象,我想比较这些BLOB对象中的内容??
我如何在Java中做到这一点.
Blob blob = new SerialBlob(cis.readAllBytes());
final Blob blob2 = test.reEncrypt(blob, "");
我想比较一下BLOB和BLOB2中的内容.我的目标是判断重新加密给我的数据是相同的还是不同的.
任何线索都会很棒的.谢谢
我有2个BLOB对象,我想比较这些BLOB对象中的内容??
我如何在Java中做到这一点.
Blob blob = new SerialBlob(cis.readAllBytes());
final Blob blob2 = test.reEncrypt(blob, "");
我想比较一下BLOB和BLOB2中的内容.我的目标是判断重新加密给我的数据是相同的还是不同的.
任何线索都会很棒的.谢谢
我会try 像这样的东西
String string1 = Base64.getEncoder().encodeToString(blob.getBytes(1, (int)blob.length()));
String string2 = Base64.getEncoder().encodeToString(blob2.getBytes(1, (int)blob2.length()));
System.out.println(string1.equals(string2));