Questions tagged «digest»

1
Java摘要与外部实用程序的结果不同
我编写了一个简单的Java类来生成Windows计算器文件的哈希值。我正在使用Windows 7 Professional with SP1。我曾尝试Java 6.0.29和Java 7.0.03。谁能告诉我为什么我从Java与(很多!)外部实用程序和/或网站获得不同的哈希值?外部的一切都相互匹配,只有Java返回不同的结果。 import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.zip.CRC32; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Checksum { private static int size = 65536; private static File calc = new File("C:/Windows/system32/calc.exe"); /* C:\Windows\System32\calc.exe (verified via …
194 java  windows  md5  digest  wow64 

8
在Android中使用DigestUtils找不到方法
我正在尝试使用JDK 1.6在Android 2.3.1中使用库DigestUtils,但是在执行该应用程序时出现以下错误: Could not find method org.apache.commons.codec.binary.Hex.encodeHexString, referenced from method org.apache.commons.codec.digest.DigestUtils.shaHex 这里有堆栈跟踪: 02-03 10:25:45.153: I/dalvikvm(1230): Could not find method org.apache.commons.codec.binary.Hex.encodeHexString, referenced from method org.apache.commons.codec.digest.DigestUtils.shaHex 02-03 10:25:45.153: W/dalvikvm(1230): VFY: unable to resolve static method 329: Lorg/apache/commons/codec/binary/Hex;.encodeHexString ([B)Ljava/lang/String; 02-03 10:25:45.153: D/dalvikvm(1230): VFY: replacing opcode 0x71 at 0x0004 02-03 10:25:45.153: D/dalvikvm(1230): VFY: …

1
RoR-MD5代
如何在Rails 3.0中使用MD5加密字符串? pass = MD5.hexdigest(pass) 在模型中产生uninitialized constant MyModel::MD5
76 ruby  hash  md5  digest 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.