scsh-hackers
[Top] [All Lists]

Re: [Scsh-hackers] md5 for scsh

To: Michel Schinz <Michel.Schinz@epfl.ch>
Subject: Re: [Scsh-hackers] md5 for scsh
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: Mon Jun 24 05:58:08 2002
Cc: scsh-hackers <scsh-hackers@lists.sourceforge.net>
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
>>>>> "Michel" == Michel Schinz <Michel.Schinz@epfl.ch> writes:


Michel> Ok. Would by chance the string be encoded using some standard
Michel> encoding, like base64? If this is the case, wouldn't it be nice to
Michel> provide only "md5-digest->number" and then separate base64 (or
Michel> whatever) encoding functions? (I would certainly see the use of fast
Michel> base64 encoding/decoding in scsh).

Sure, base64 would be a win, but it looks more suitable for the sunet
package. Having thought about this once more I agree to drop
md5-digest->string.

[...]


Michel> Now that I think about it, wouldn't it be nice to provide a general
Michel> "digest" interface, which could be used to obtain digests with various
Michel> algorithms, be it MD5, FNV or others? For example, your
Michel> "md5-digest-for-file" function would be transformed to something like:

Michel>   (digest-for-file algorithm fname/port/fd)

Michel> where "algorithm" would be a symbol among "MD5", "FNV", etc. (or some
Michel> object returned by a function to create an encoder).

Let's return to this when we have more then one algorithm.

Michel> For low-level functions this might not be a good idea since they might
Michel> depend heavily on their algorithm, but I think that for high-level
Michel> functions it makes sense.

Maybe some sort of init-update-digest sequence?

-- 
Martin


<Prev in Thread] Current Thread [Next in Thread>