pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: elmarkivp <elmarkivo@hotmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: store files encrypted with pgcrypto
Date: Wed, 22 Oct 2008 08:56:58 +1100
Message-ID: <48FE502A.5090707@gmail.com> (raw)
In-Reply-To: <BAY108-DAV39826CFF85D285CF8C600A32E0@phx.gbl>
References: <BAY108-DAV39826CFF85D285CF8C600A32E0@phx.gbl>

elmarkivp wrote:
> Hi, i'm trying to store files encrypted in postgres 8.3.4, using 
> sym_encrypt_bytea function.
> this is quoted from the postgres8.3 documentation, thats was my guide, 
> below is the php code i have used to make it, with no results and the 
> respective errors.
>  
> FROM http://www.postgresql.org/docs/8.3/static/pgcrypto.html
>  
> F.20.3.1. pgp_sym_encrypt()
>  
>     pgp_sym_encrypt(data text, psw text [, options text ]) returns bytea
>     pgp_sym_encrypt_bytea(data bytea, psw text [, options text ]) 
> returns bytea
>   
>  
> Encrypt data with a symmetric PGP key psw. The options parameter can 
> contain option settings, as described below.
> F.20.3.2. pgp_sym_decrypt()
>  
>     pgp_sym_decrypt(msg bytea, psw text [, options text ]) returns text
>     pgp_sym_decrypt_bytea(msg bytea, psw text [, options text ]) returns 
> bytea
>   

<snip>

> ERRORS:  
>   ERROR: No function matches the given name and argument types. You 
> might need to add explicit type casts 
>   ERROR: function pgp_sym_encrypt_bytea(unknown, integer, unknown) does 
> not exist

pgcrypto is a contrib module in pg 8.3 (ie not built in by default). Did 
you install the module?

There are instructions on how to do that here:

http://www.postgresql.org/docs/8.3/static/contrib.html

-- 
Postgresql & php tutorials
http://www.designmagick.com/




view thread (2+ messages)

Message-ID: <48FE502A.5090707@gmail.com>
Permalink:  ../48FE502A.5090707@gmail.com/
Also on:    postgresql.org/message-id/48FE502A.5090707@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: dmagick@gmail.com, elmarkivo@hotmail.com
  Subject: Re: store files encrypted with pgcrypto
  In-Reply-To: <48FE502A.5090707@gmail.com>
  References: <BAY108-DAV39826CFF85D285CF8C600A32E0@phx.gbl> <48FE502A.5090707@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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