pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedWhat libraries need to be included in C program for encrypt and decrypt functions?
2+ messages / 2 participants
[nested] [flat]
* What libraries need to be included in C program for encrypt and decrypt functions?
@ 2005-08-16 13:59 The One <i51359@yahoo.com>
2005-08-16 16:25 ` Re: What libraries need to be included in C program for encrypt and decrypt functions? Owen Jacobson <ojacobson@osl.com>
0 siblings, 1 reply; 2+ messages in thread
From: The One @ 2005-08-16 13:59 UTC (permalink / raw)
To: pgsql-sql
Hi,
Can some body tell me what I need to include in the makefile for my C program so it will call the correct encrypt/decrypt functions.
This is what I have in the makefile
testcrypto:
${CC} -o ${BIN}/testcrypto.exe testcrypto.c -I/usr/include/postgresql/server/libpq -L/lib/postgresql -lpq -lcrypt
I'm calling the function like this
printf("test encryption: %s", encrypt("hello", "0000BBBB", "aes");
But I'm getting too many arguments in function encrypt.
Thank you
---------------------------------
Start your day with Yahoo! - make it your home page
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: What libraries need to be included in C program for encrypt and decrypt functions?
2005-08-16 13:59 What libraries need to be included in C program for encrypt and decrypt functions? The One <i51359@yahoo.com>
@ 2005-08-16 16:25 ` Owen Jacobson <ojacobson@osl.com>
0 siblings, 0 replies; 2+ messages in thread
From: Owen Jacobson @ 2005-08-16 16:25 UTC (permalink / raw)
To: pgsql-sql
As I mentioned in email, the function "encrypt" exposed by libcrypt
(the -lcrypt part of your command line) has nothing to do with the "encrypt"
function available in pgcrypto.sql, which You Cannot Call From C. You have
to embed calls to it inside an SQL query like
INSERT INTO some_table (some_col) VALUES (ENCRYPT ('Hello', 'AAAA0000',
'aes'));
-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of The One
Sent: Tuesday, August 16, 2005 7:00 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] What libraries need to be included in C program for encrypt
and decrypt functions?
Hi,
Can some body tell me what I need to include in the makefile for my C
program so it will call the correct encrypt/decrypt functions.
This is what I have in the makefile
testcrypto:
${CC} -o ${BIN}/testcrypto.exe
testcrypto.c -I/usr/include/postgresql/server/libpq -L/lib/postgresql -lpq -
lcrypt
I'm calling the function like this
printf("test encryption: %s", encrypt("hello", "0000BBBB", "aes");
But I'm getting too many arguments in function encrypt.
Thank you
----------------------------------------------------------------------------
--
Start your day with Yahoo! - make it your home page
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-08-16 16:25 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 13:59 What libraries need to be included in C program for encrypt and decrypt functions? The One <i51359@yahoo.com>
2005-08-16 16:25 ` Owen Jacobson <ojacobson@osl.com>
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