pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to encode and decode password in pgsql !!
8+ messages / 6 participants
[nested] [flat]
* How to encode and decode password in pgsql !!
@ 2001-05-01 19:37 Subhramanya Shiva <shiva@archeanit.com>
0 siblings, 2 replies; 8+ messages in thread
From: Subhramanya Shiva @ 2001-05-01 19:37 UTC (permalink / raw)
To: pgsql-sql
hi all
how to store password details in a table. in encoded form
and how to decode it.
in mysql ...we r having encoding and decoding for a password
security ... so how to do in pgsql...
regards
Shiva.
--
Subhramanya Shiva, Programmer
Archean InfoTech pvt.Ltd.
Hyderabad, India
http://www.archeanit.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-03 12:46 D'Arcy J.M. Cain <darcy@druid.net>
parent: Subhramanya Shiva <shiva@archeanit.com>
1 sibling, 2 replies; 8+ messages in thread
From: darcy@druid.net @ 2001-05-03 12:46 UTC (permalink / raw)
To: Subhramanya Shiva <shiva@archeanit.com>; +Cc: pgsql-sql
Thus spake Subhramanya Shiva
> how to store password details in a table. in encoded form
> and how to decode it.
>
> in mysql ...we r having encoding and decoding for a password
> security ... so how to do in pgsql...
You use the chkpass type that I just commited to the distribution (finally.)
Here is an example of its usage.
darcy=# CREATE TABLE x (i serial, p chkpass);
NOTICE: CREATE TABLE will create implicit sequence 'x_i_seq' for SERIAL column 'x.i'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'x_i_key' for table 'x'
CREATE
darcy=# INSERT INTO x (p) VALUES ('hello');
INSERT 805247 1
darcy=# INSERT INTO x (p) VALUES ('goodbye');
INSERT 805248 1
darcy=# SELECT * FROM x;
i | p
---+----------------
1 | :SoLA2YFpQYV/I
2 | :Sg8CKkFqqTGec
(2 rows)
darcy=# SELECT p = 'hello' FROM x WHERE i = 1;
?column?
----------
t
(1 row)
darcy=# SELECT p = 'hello' FROM x WHERE i = 2;
?column?
----------
f
(1 row)
darcy=# SELECT i, raw(p) FROM x;
i | raw
---+---------------
1 | SoLA2YFpQYV/I
2 | Sg8CKkFqqTGec
(2 rows)
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-03 16:58 Josh Berkus <josh@agliodbs.com>
parent: D'Arcy J.M. Cain <darcy@druid.net>
1 sibling, 2 replies; 8+ messages in thread
From: Josh Berkus @ 2001-05-03 16:58 UTC (permalink / raw)
To: pgsql-sql; +Cc: pgsql-sql
D'Arcy,
> You use the chkpass type that I just commited to the distribution
> (finally.)
> Here is an example of its usage.
Does that mean that chkpass is part of 7.1, or only the current CVS?
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-03 18:14 Subhramanya Shiva <shiva@archeanit.com>
parent: D'Arcy J.M. Cain <darcy@druid.net>
1 sibling, 1 reply; 8+ messages in thread
From: Subhramanya Shiva @ 2001-05-03 18:14 UTC (permalink / raw)
To: pgsql-sql
i could not find chkpass in pgsql datatypes ...
it is giving error called :
Unable to locate type name chkpass in catalog.
what shall i do ??
regards
Shiva.
> Thus spake Subhramanya Shiva
> > how to store password details in a table. in encoded form
> > and how to decode it.
> >
> > in mysql ...we r having encoding and decoding for a password
> > security ... so how to do in pgsql...
>
> You use the chkpass type that I just commited to the distribution
(finally.)
> Here is an example of its usage.
>
> darcy=# CREATE TABLE x (i serial, p chkpass);
> NOTICE: CREATE TABLE will create implicit sequence 'x_i_seq' for SERIAL
column 'x.i'
> NOTICE: CREATE TABLE/UNIQUE will create implicit index 'x_i_key' for
table 'x'
> CREATE
> darcy=# INSERT INTO x (p) VALUES ('hello');
> INSERT 805247 1
> darcy=# INSERT INTO x (p) VALUES ('goodbye');
> INSERT 805248 1
> darcy=# SELECT * FROM x;
> i | p
> ---+----------------
> 1 | :SoLA2YFpQYV/I
> 2 | :Sg8CKkFqqTGec
> (2 rows)
>
> darcy=# SELECT p = 'hello' FROM x WHERE i = 1;
> ?column?
> ----------
> t
> (1 row)
>
> darcy=# SELECT p = 'hello' FROM x WHERE i = 2;
> ?column?
> ----------
> f
> (1 row)
>
> darcy=# SELECT i, raw(p) FROM x;
> i | raw
> ---+---------------
> 1 | SoLA2YFpQYV/I
> 2 | Sg8CKkFqqTGec
> (2 rows)
>
> --
> D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
> http://www.druid.net/darcy/ | and a sheep voting on
> +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
>
--
Subhramanya Shiva, Programmer
Archean InfoTech pvt.Ltd.
Hyderabad, India
http://www.archeanit.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-03 19:22 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Josh Berkus <josh@agliodbs.com>
1 sibling, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2001-05-03 19:22 UTC (permalink / raw)
To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-sql
[ Charset ISO-8859-1 unsupported, converting... ]
> D'Arcy,
>
> > You use the chkpass type that I just commited to the distribution
> > (finally.)
> > Here is an example of its usage.
>
> Does that mean that chkpass is part of 7.1, or only the current CVS?
>
It will appear in 7.1.1, to be released soon.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-03 19:32 Tom Lane <tgl@sss.pgh.pa.us>
parent: Josh Berkus <josh@agliodbs.com>
1 sibling, 0 replies; 8+ messages in thread
From: Tom Lane @ 2001-05-03 19:32 UTC (permalink / raw)
To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
>> You use the chkpass type that I just commited to the distribution
> Does that mean that chkpass is part of 7.1, or only the current CVS?
Unless someone rips it out again, it will be part of 7.1.1.
I think D'Arcy acted inappropriately in committing a new-feature item
before we'd made the branch for 7.2 development. But I don't have the
time to argue about it...
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-03 23:34 Roberto Mello <rmello@cc.usu.edu>
parent: Subhramanya Shiva <shiva@archeanit.com>
1 sibling, 0 replies; 8+ messages in thread
From: Roberto Mello @ 2001-05-03 23:34 UTC (permalink / raw)
To: Subhramanya Shiva <shiva@archeanit.com>; +Cc: pgsql-sql
On Wed, May 02, 2001 at 01:07:57AM +0530, Subhramanya Shiva wrote:
> hi all
>
> how to store password details in a table. in encoded form
> and how to decode it.
>
> in mysql ...we r having encoding and decoding for a password
> security ... so how to do in pgsql...
I usually do the encrypting in the client application (AOLserver, PHP),
store the encrypted password, when the user comes back and enters the
password I encrypt it and test it against what's on the database.
-Roberto
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
Thou shall not kill, unless it's for dinner!
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to encode and decode password in pgsql !!
@ 2001-05-04 11:35 D'Arcy J.M. Cain <darcy@druid.net>
parent: Subhramanya Shiva <shiva@archeanit.com>
0 siblings, 0 replies; 8+ messages in thread
From: darcy@druid.net @ 2001-05-04 11:35 UTC (permalink / raw)
To: Subhramanya Shiva <shiva@archeanit.com>; +Cc: pgsql-sql
Thus spake Subhramanya Shiva
> i could not find chkpass in pgsql datatypes ...
> it is giving error called :
>
> Unable to locate type name chkpass in catalog.
>
> what shall i do ??
You need the code that I just committed. You can get the files from
http://www.ca.postgresql.org/cgi/cvsweb.cgi/pgsql/contrib/chkpass/.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2001-05-04 11:35 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-01 19:37 How to encode and decode password in pgsql !! Subhramanya Shiva <shiva@archeanit.com>
2001-05-03 12:46 ` D'Arcy J.M. Cain <darcy@druid.net>
2001-05-03 16:58 ` Josh Berkus <josh@agliodbs.com>
2001-05-03 19:22 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-05-03 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-05-03 18:14 ` Subhramanya Shiva <shiva@archeanit.com>
2001-05-04 11:35 ` D'Arcy J.M. Cain <darcy@druid.net>
2001-05-03 23:34 ` Roberto Mello <rmello@cc.usu.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox