Questions tagged [pgcrypto]

The pgcrypto module provides cryptographic functions for PostgreSQL.

The pgcrypto module provides cryptographic functions for PostgreSQL.

102 questions
0
votes
1 answer

HMAC postgres error - No function matches the given name and argument types

I'm getting below error while using hmac method in postgres. Please help. root@go=# SELECT HMAC('MyPassword','mykey','md5'); ERROR: 42883: function hmac(unknown, unknown, unknown) does not exist LINE 1: SELECT HMAC('MyPassword','mykey','md5'); …
Thavaprakash Swaminathan
  • 6,226
  • 2
  • 30
  • 31
0
votes
1 answer

how to test pass with pgcrypto (with realm - digesthashmethod)

I try to check password using pgcrypt I can only use two methods (database limitation) HtPasswdHashMethod HtDigestHashMethod I can use the first method: SELECT crypt('mypass',value)=value FROM passwords where person=1 but I have to change the…
Tomasz Brzezina
  • 1,452
  • 5
  • 21
  • 44
0
votes
0 answers

django-pgcrypto: AttributeError: module 'django.db.models' has no attribute 'SubfieldBase'

I am trying to add django-pgcrypto to my django project but I am getting an error message: class EncryptedTextField (six.with_metaclass(models.SubfieldBase, BaseEncryptedField)): AttributeError: module 'django.db.models' has no attribute…
Codey McCodeface
  • 2,988
  • 6
  • 30
  • 55
0
votes
2 answers

Using Postgres PGCrypto encryption requires superuser to run view queries

Using: Postgres 9, CentOS 7, Postgres Data directory not in default location but used RSync to make sure permissions were correct. And yes appropriate .config files were changed. When I try to query a view containing an encrypted item as a NON…
cshenderson
  • 103
  • 1
  • 1
  • 9
0
votes
0 answers

AES encryption in POSTRGESQL

I used a function in pgcrypto - encrypt('id','TheBestSecretKey','aes') to encrypt a field in postgresql(Pg admin tool).The field got encrypted and the output was in bytea format like:\234u\321\036\027\317O\371\020bb\342\334x)\236. The same data when…
bhavanak
  • 255
  • 1
  • 12
0
votes
2 answers

Issue with pgcrypto pgp_pub_encrypt

I have been trying to test the pgcrypto extension in Postgres but am having some difficulties. When I try and encrypt data, I keep getting a ERROR: No encryption key found ********** Error ********** ERROR: No encryption key found SQL state:…
DevilJ
  • 61
  • 2
  • 6
0
votes
2 answers

specify database adapter on Heroku

I'm using pgcrypto gem to encrypt data in certain columns of the database, but in order for this gem to work I have to specify pgcrypto as an adapter in database.yml file. I know that Heroku disregards this file and generates its own when…
koss
  • 874
  • 1
  • 10
  • 22
0
votes
1 answer

Pgcrypto doesn't work correctly on Windows

I execute the same query on 2 different servers and I get a different results. Does anyone know why? select decrypt('\x792135887dace2af15d3f8548cc20919','\x265bb788ef6762abf50577f8a6669aa0','aes-ecb') Debian postgresql 9.3 server output (result…
Alexandre
  • 3,088
  • 3
  • 34
  • 53
0
votes
1 answer

how can i use pgcrypto to login in postgres 9

This code is not working: select * from persons where lower(email) = lower({email}) and (password = crypt('{password}', password)) and approved = 1 and now() between start_date and coalesce(end_date,…
mbrambley
  • 245
  • 3
  • 10
0
votes
2 answers

postgresql des encrypt

I have oracle database to move on to new postgresql server. Some tables are having field sesitive and those are all encryted through DBMS_OBFUSCATION_TOOLKIT.DESENCRYPT/DESDECRYPT. The problem is here. The size of postgresql's encrypted data…
KIM
  • 1,204
  • 2
  • 17
  • 33
-1
votes
1 answer

How to install pgcrypto extension on postgres13 on MacOS

I'm using postgres13 and running a somewhat old ruby on rails project, it has a few migrations and one of the first lines on those migration files is: enable_extension "pgcrypto" All the migrations with that fail. After looking up online, most…
-1
votes
2 answers

How does postgresql's crypt() function know that a password matches a stored one?

I am learning to use crypt() function from pgcrypto to crypt my passwords and store them into user tables. However I don't understand how it is possible for the crypt function to generate the same password if we pass as a second parameter the…
Varadus
  • 23
  • 9
1 2 3 4 5 6
7