[ANNC][RFC] crypto hashes for PostgreSQL 7.0, 7.1

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема [ANNC][RFC] crypto hashes for PostgreSQL 7.0, 7.1
Дата
Msg-id 20001019192219.A23645@l-t.ee
обсуждение исходный текст
Ответы Re: [ANNC][RFC] crypto hashes for PostgreSQL 7.0, 7.1  (Karel Zak <zakkr@zf.jcu.cz>)
Re: [ANNC][RFC] crypto hashes for PostgreSQL 7.0, 7.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [ANNC][RFC] crypto hashes for PostgreSQL 7.0, 7.1  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
 http://www.l-t.ee/marko/pgsql/pgcrypto-0.1.tar.gz    (11k)

Here is a implementation of crypto hashes for PostgreSQL.
It exports 2 functions to SQL level:
 digest(data::text, hash_name::text)       which returns hexadecimal coded hash over data by       specified algorithm.
eg
       > select digest('blah', 'sha1');       5bf1fd927dfb8679496a2e6cf00cbe50c1c87145
       (I see no point returning binary hash.. ??)
 digest_exists(hash_name::text)::bool       which reports if particular hash type exists.

It can be linked with various libraries:
 standalone:       MD5, SHA1
       (the code is from KAME project.  Actually I hate code       duplication, but I also want to quarantee that MD5
and      SHA1 exist)
 
 mhash (0.8.1):       MD5, SHA1, CRC32, CRC32B, GOST, TIGER, RIPEMD160,       HAVAL(256,224,192,160,128)
 openssl:       MD5, SHA1, RIPEMD160, MD2
 kerberos5 (heimdal):       MD5, SHA1

As you can see I am thinking making MD5 and SHA1 standard.

And yes, it could be made 'standalone only' but in case of
OpenSSL and mhash the code is imported very cleanly (my
code has no hard-wired hashes)   ???

The code should also be 8-bit clean and TOAST-enabled - but
I am not 100% sure.  And if is declared as digest(text,text)
does it work on bytea?

It is packaged at the moment as stand-alone package, because
I am trying to write general autoconf macros for use with outside
packages.  At the moment any package author must generate those
himself.  Also the contrib stuff should be possible to make use
of this instead of include ../../Makefile.* so they can enjoy
the same (dis)advantages as outside packages.

Status:
 C code        - stable autoconf      - beta make install  - does not work

If there is interest I can package it as a contrib or even
mainstream diff against CVS ???


-- 
marko



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Vadim Mikheev"
Дата:
Сообщение: Re: SetQuerySnapshot() for utility statements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: make depend (Re: Coming attractions: VPATH build; make variables issue)