On 23 Apr., 11:20, Martin Rubey <············@univie.ac.at> wrote:
> Dear all,
>
> finally I know what I want: a base32 encoder. Anybody has one available?
How about
(let ((*print-base* 32)) (print 1234)) ?
ciao,
Jochen
+ ···@codeartist.org" <··@codeartist.org>:
| On 23 Apr., 11:20, Martin Rubey <············@univie.ac.at> wrote:
|> Dear all,
|>
|> finally I know what I want: a base32 encoder. Anybody has one available?
|
| How about
|
| (let ((*print-base* 32)) (print 1234)) ?
Probably not what the OP had in mind. See RFC 4648 and
http://en.wikipedia.org/wiki/Base_32
It's probably easiest to knock one together yourself.
The specification isn't that hard, really.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
Harald Hanche-Olsen <······@math.ntnu.no> writes:
> + ···@codeartist.org" <··@codeartist.org>:
>
> | On 23 Apr., 11:20, Martin Rubey <············@univie.ac.at> wrote:
> |> Dear all,
> |>
> |> finally I know what I want: a base32 encoder. Anybody has one available?
> |
> | How about
> |
> | (let ((*print-base* 32)) (print 1234)) ?
>
> Probably not what the OP had in mind. See RFC 4648 and
>
> http://en.wikipedia.org/wiki/Base_32
>
> It's probably easiest to knock one together yourself.
> The specification isn't that hard, really.
Well, I ressorted to md5sum meanwhile. Although it's not really bijective (not
even injective...), it should be sufficient for what I need.
Here is what I want to do, just in case:
I have a string like
ostretch`2`x`(_$,ACMachineInteger)->_$`dCycleIndexSeries``
and need to convert it into a filename, preferably in a way such that case
doesn't matter. Furthermore, since these strings get rather long, some sort of
compression would be desirable. It seems that md5sum does it just right.
Although I must admit that it would be *very* annoying to have two strings give
the same checksum, and I have no idea how likely this is.
So, my first idea was to use gzip on the the string and convert the result
using base32. Very likely though, that's much too complicated.
many thanks for your help,
Martin
PS: in case somebody else cares: I found cl-base64. Probably that could be
tuned to cover base32 as well.
+ Martin Rubey <········@yahoo.de>:
| It seems that md5sum does it just right.
| Although I must admit that it would be *very* annoying to have two
| strings give the same checksum, and I have no idea how likely this
| is.
Let us say: Extremely unlikely. MD5 is designed as a cryptographic
hash, which means it should be computationally infeasible to find two
distinct strings hashing to the same value. Unfortunately MD5 has
been broken,� but for your purposes it should be more than sufficient.
Heck, any CRC with a sufficient number of bits should be sufficient,
though it has no cryptographic strength at all.
� http://en.wikipedia.org/wiki/Md5
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell