Net::FCP::Util - utility functions.
use Net::FCP::Util;
Returns the uppercased version of the given identifier. Used internally to map from e.g. URIError/KeyCollision to the form used in this module, i.e. uri_error/key_collision etc.
Returns the lowercased version of the given identifier. See touc.
touc
The opposite of hex, i.e. returns the the number as hex string. Mainly useful due to it's prototype of $.
hex
$
Calculate the (integer) log2 of a number, rounded up. If $minlog is given it will be the minimum value returned.
$minlog
Encode the given number as a multiple-precision number (2 byte bitlength + bytes)
Decode freenet's perverted version of base64.
Encode into freenet's perverted version of base64.
Generate and return they hash portion (the part after the comma, the crypto key) that would be used in the CHK (as binary). This can be used to verify contents of a CHK, since this key is a hash over the data.
(This function assumes a 128 bit key, which seems standard in freenet).
Extract the hash portion (the part after the comma, the crypto key) of a CHK (in binary). Useful to compare against the output of generate_chk_key.
Net::FCP.
Not heavily tested.
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/
To install Net::FCP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FCP
CPAN shell
perl -MCPAN -e shell install Net::FCP
For more information on module installation, please visit the detailed CPAN module installation guide.