Why is hashing the info dict turning out wrong?
问题 I have been trying for ages to get this hashing thing for BitTorrent to work in Java but it always becomes wrong. I have narrowed it down to a few lines of code where I'm 99% sure the problem is: Bencode bencode = new Bencode(Charset.forName("UTF-8")); byte[] fileBytes = new byte[33237]; Map<String, Object> dict = bencode.decode(fileBytes, Type.DICTIONARY); Map infoMap = (Map) object.get("info"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); BencodeOutputStream bos = new