tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposed addition of strcodecs(3) library - review requested



On 09/18/10 18:35, Alistair Crooks wrote:
> On Sat, Sep 18, 2010 at 05:06:24PM +0200, Jean-Yves Migeon wrote:
>> Would it be part of libnetpgp, or become an independant lib that can be
>> used by other binaries, like cksum(1)?
>
> Yes, I was looking at making it an independent lib, so cksum,
> uu(en|de)code, atob/btoa, asa can use it, as well as gaining new
> functionality like command line and lib access to all kinds of
> hashing, cksum, character set encoding and decoding, network name
> resolution and reverse resolution, etc.
>
> I've just thought that I should add a function to do the work of
> pwhash(1) too.

Well, there's a lot of potential consumers then; if you include charsets
too, iconv is in the loop...

>> Given that strcodecs(3) and libcrypto share some functionalities, isn't
>> there a risk of (symbol) collisions?
>>
>> (just wondering -- I am not aware of all the implementation details)
>
> I hope not - all the exposed strcodecs functions have a prefix of
> "strcodec". :-)

That pretty much solves this issue.

> I think strcodecs(3) provides 3 things:
>
> 1.  a way of gathering together existing functionality, which is
> seldom used, into one general command - asa(1) is a particular
> favourite of mine in this regard - but also uuencode, uudecode, and
> rot13 come to mind.  strcodecs(3) provides a way to do rot<N>, BTW
>
> 2.  as you note, a wrapper around a lot of libraries, providing a
> consistent and simple interface, like the wrapper around gzip's
> compress(3) functions, and the libc digest functions, and
>
> 3.  new and useful functionality like base64 and base85 encoding, and
> character set conversion, soundex/metaphone, etc.

4. ease regression testing (:

-- 
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index