Ok.
So if I see things right, these mentioned classes should go into "Crypto.pmod/module.pmod" and for each CRC type, I create a module, ie "Crypto.pmod/CRC16X.pmod" ?
On 06/15/2010 09:40 PM, Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum wrote:
The hash API basically works looks like this
class CRC { string name(); int digest_size(); int block_size(); CRCState `() string hash(string data); }
class CRCState { string name(); int digest_size(); int block_size(); string hash(string data); CRCState update(string data); string digest(void|int length); }
The CRC (non-state) classes can also go into module.pmod, since they're small. A class doesn't _have_ to be in its own pmod file to behave like a module. In a module.pmod file one would do something like this to create a submodule:
protected class _MySubModule { ... }
_MySubModule MySubModule = _MySubModule();
Afaik there's no established name convention for this kind of classes. I just picked a name with a "_" prefix in lack of any better ideas.
pike-devel@lists.lysator.liu.se