Edgar Friendly wrote:
Aeloria Resa <[EMAIL PROTECTED]> writes:


Ok, problem. I'm sitting here, I can make SHA1 hashes, so I've got the
binary values for them (in bytes) as specified by the FNP doc. Now,
how exactly do I encode them so that they come out like the hashes in
use in Fred?



Well, There's a lot of hashes that fred produces, but the easiest to
duplicate are CHKs.  The first issue is that they are a hash of a
Fieldset, with unusual byte values used for the \n, =, and
. characters as normally used.  But other than that, just take the
hash of the storables, and append a byte indicating the log (base 2)
of the datasize, and then the magic value 0x0302;
(freenet-style-)base64 encode that, and you've got a CHK.

Thelema

O_o? Ook, I'll just go read the code. I'd prefer using the builtin ComputeHash though..last time I tried writing an SHA1 hasher myself..


Yes I found out this morn about the base64 oddness.


_______________________________________________ devl mailing list [EMAIL PROTECTED] http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl

Reply via email to