Thread: New Type

New Type

From
Olivier PRENANT
Date:
Hi all,

I'm trying to create a type password; the goal is to have a table like:

CREATE TABLE test (
username varchar,
pass passwd);

insert into test values ('me','secret');

and have "secret" being automagicly crypted.

What I want is to mimic the PASSWORD function of mysql but much better,
not having to call a function.

I just can't figure how to write the xx_crypt(opaque) returns opaque
function.

Any help available???

TIA

-- 
Olivier PRENANT             Tel:    +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
FRANCE                      Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)




RE: New Type

From
"Krotenko Valery V."
Date:
>Hi all,
>I'm trying to create a type password; the goal is to have a table
like:
>CREATE TABLE test (>username varchar,>pass passwd);
>insert into test values ('me','secret');
>and have "secret" being automagicly crypted.
>What I want is to mimic the PASSWORD function of mysql but much
better,>not having to call a function.
>I just can't figure how to write the xx_crypt(opaque) returns
opaque>function.
>Any help available???
>TIA
I have function for crypt password in MD5(c - function). Are you
need it.
Valery Krotenko.