Questions tagged [pgcrypto]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
15k views

Do I need to execute "create extension pgcrypto" everytime?

I have used crypt() in one of my functions to hash user password. But what I observed the next day I started my pc that the same thing failed as cryptographic functions became unavailable upon restart....
user avatar
3 votes
4 answers
15k views

How to install pgcrypto extension in postgres 10 on CentOS 7

I'm in the process of creating a postgres database for production in CentOS 7. So I already installed (yum install postgresql10-server postgresql10 after adding the repos of course) and configured ...
user avatar
  • 33
4 votes
2 answers
3k views

Encryption with pgcrypto

I am working on encrypting a column in a postgre table using pgcrypto. The postgre version is 9.5.1. I have figured out how to encrypt using pgp_sym_encrypt() and decrypt using pgp_sym_decrypt(). My ...
user avatar
  • 339
3 votes
2 answers
191 views

Detect if `pg_crypto` in Postgres was built with strong random feature enabled

The source code for pg_crypto module mentions an option to build without cryptographically-strong random generation. /* Generate random bits. pg_backend_random() will do here, we don't promis UUIDs ...
user avatar
3 votes
1 answer
6k views

Need to encrypt certain columns in a table but also be able to sort and search

We've got a web app that needs to store sensitive data entered by the user. Currently we're exploring PostgreSQL in AWS. I'm aware of pgcryto and that we can hash contents of certain columns (as not ...
user avatar
19 votes
1 answer
38k views

psql 9.5: gen_random_uuid() not working

SELECT gen_random_uuid() produces output ERROR: function gen_random_uuid() does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add ...
user avatar
  • 293
4 votes
1 answer
2k views

In RDS digest function is undefined after creating pgcrypto extension

On an AWS RDS instance, we have run CREATE EXTENSION pgcrypto; The extension gets created. Both queries: SELECT digest('a', 'sha256') FROM table_name; SELECT public.digest('a', 'sha256') FROM ...
user avatar
  • 181
0 votes
0 answers
198 views

Getting PAM-compatible password hashes from pgcrypto

I want to keep user records in Postgres database and faced one issue which block me. It is password encryption. For example, this is correcetly encrypted password 12345 via default Ubuntu crypt ...
user avatar
  • 101
6 votes
3 answers
4k views

Adding unsigned 256 bit integers in PostgreSQL

I was wondering if there would be any way to do the following in PostgreSQL: UPDATE cryptotable SET work = work + 'some big hexadecimal number' where work is an unsigned 256 bit number. Right now my ...
user avatar
1 vote
2 answers
1k views

Error installing pgcrypto extension [closed]

I want to install the pgcrypto extension on my postgresql installation on Windows. I found that I just have to call CREATE EXTENSION pgcrypto; but I've got an error : Syntax error on « CREATE » LINE ...
user avatar
3 votes
1 answer
4k views

How do I install pgcrypto on Windows?

I would like to install pgcrypto in Windows. I have a file C:\Program\PostgreSQL\9.0\share\contrib\pgcrypto.sql but when I try to run it in psql I get an error: C:: Permission denied How do I solve ...
user avatar
  • 30.2k
23 votes
3 answers
57k views

How do I install pgcrypto in PostgreSQL 8.4?

I'm using Ubuntu Server 10.10 and I have installed PostgreSQL 8.4 using apt-get install postgresql. I would like to use the built-in sha1() function, but it seems that I have to install pgcrypto first....
user avatar
  • 30.2k